From f9719b91493a9ecea82244024a7da2f081a0ec37 Mon Sep 17 00:00:00 2001 From: ENI Date: Mon, 26 Oct 2026 20:16:57 +0300 Subject: [PATCH] =?UTF-8?q?ci:=20=D0=B2=D0=BE=D1=80=D0=BA=D1=84=D0=BB?= =?UTF-8?q?=D0=BE=D1=83=20=D0=B2=20.gitea/workflows=20(GitHub-=D1=82=D0=BE?= =?UTF-8?q?=D0=BA=D0=B5=D0=BD=20=D0=B1=D0=B5=D0=B7=20scope=20workflow=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BA=D0=BB=D0=BE=D0=BD=D1=8F=D0=B5=D1=82=20.githu?= =?UTF-8?q?b/workflows),=20=D0=BA=D0=BE=D0=BF=D0=B8=D1=8F=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20GitHub=20=D0=B2=20ci/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {.github => .gitea}/workflows/ci.yml | 0 ci/README.md | 7 +++++++ ci/github-actions-ci.yml | 31 ++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) rename {.github => .gitea}/workflows/ci.yml (100%) create mode 100644 ci/README.md create mode 100644 ci/github-actions-ci.yml diff --git a/.github/workflows/ci.yml b/.gitea/workflows/ci.yml similarity index 100% rename from .github/workflows/ci.yml rename to .gitea/workflows/ci.yml diff --git a/ci/README.md b/ci/README.md new file mode 100644 index 0000000..69dcc0b --- /dev/null +++ b/ci/README.md @@ -0,0 +1,7 @@ +# CI для GitHub Actions + +Файл лежит здесь, а не в .github/workflows, потому что токен пуша не имеет scope `workflow` +и GitHub отклоняет любую запись в .github/workflows/*.yml. + +Активировать: перенести в .github/workflows/ci.yml из аккаунта с scope workflow +(gh auth refresh -s workflow), либо включить Actions в Gitea — там уже работает .gitea/workflows/ci.yml. diff --git a/ci/github-actions-ci.yml b/ci/github-actions-ci.yml new file mode 100644 index 0000000..63f8446 --- /dev/null +++ b/ci/github-actions-ci.yml @@ -0,0 +1,31 @@ +name: ci + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: deps + run: | + python -m pip install --upgrade pip + pip install pytest + - name: compile + run: python -m compileall -q omni tools + - name: tests + run: python -m pytest tests -q + - name: smoke cli + run: | + python -m omni --help > /dev/null + python -c "import omni.sources as s; print('sources', len(s.all_sources()))" \ No newline at end of file