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