ci: sequential checks, heavy pytest, and skip ci on auto-merge
This commit is contained in:
@@ -19,20 +19,6 @@ jobs:
|
|||||||
- run: pip install ruff
|
- run: pip install ruff
|
||||||
- run: ruff check .
|
- run: ruff check .
|
||||||
|
|
||||||
test:
|
|
||||||
name: Test (pytest)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version: ["3.11", "3.12"]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
- run: pip install -e .[dev]
|
|
||||||
- run: pytest tests/ -v --tb=short
|
|
||||||
|
|
||||||
bandit:
|
bandit:
|
||||||
name: SAST (bandit)
|
name: SAST (bandit)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -56,10 +42,27 @@ jobs:
|
|||||||
- run: pip install -e .[dev]
|
- run: pip install -e .[dev]
|
||||||
- run: pip-audit --skip-editable
|
- run: pip-audit --skip-editable
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Test (pytest)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [lint, bandit, pip-audit]
|
||||||
|
strategy:
|
||||||
|
fail-fast: true
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.11", "3.12"]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
- run: pip install -e .[dev]
|
||||||
|
- run: pytest -m ""
|
||||||
|
|
||||||
|
|
||||||
merge-to-testing:
|
merge-to-testing:
|
||||||
name: Merge dev → testing
|
name: Merge dev → testing
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [lint, test, bandit, pip-audit]
|
needs: test
|
||||||
if: github.ref == 'refs/heads/dev'
|
if: github.ref == 'refs/heads/dev'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -74,13 +77,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git fetch origin testing
|
git fetch origin testing
|
||||||
git checkout testing
|
git checkout testing
|
||||||
git merge origin/dev --no-ff -m "ci: auto-merge dev → testing"
|
git merge origin/dev --no-ff -m "ci: auto-merge dev → testing [skip ci]"
|
||||||
git push origin testing
|
git push origin testing
|
||||||
|
|
||||||
open-pr:
|
open-pr:
|
||||||
name: Open PR to main
|
name: Open PR to main
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [lint, test, bandit, pip-audit]
|
needs: test
|
||||||
if: github.ref == 'refs/heads/testing'
|
if: github.ref == 'refs/heads/testing'
|
||||||
steps:
|
steps:
|
||||||
- name: Open PR via Gitea API
|
- name: Open PR via Gitea API
|
||||||
|
|||||||
Reference in New Issue
Block a user