ci: воркфлоу в .gitea/workflows (GitHub-токен без scope workflow отклоняет .github/workflows), копия для GitHub в ci/
This commit is contained in:
7
ci/README.md
Normal file
7
ci/README.md
Normal file
@@ -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.
|
||||||
31
ci/github-actions-ci.yml
Normal file
31
ci/github-actions-ci.yml
Normal file
@@ -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()))"
|
||||||
Reference in New Issue
Block a user