From ea9f7e734b27d95c0a9e721814727d1f9613802a Mon Sep 17 00:00:00 2001 From: anti Date: Sun, 12 Apr 2026 03:55:12 -0400 Subject: [PATCH] ci: sequential checks, heavy pytest, and skip ci on auto-merge --- .gitea/workflows/ci.yml | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 16fa5a0..220e412 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -19,20 +19,6 @@ jobs: - run: pip install ruff - 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: name: SAST (bandit) runs-on: ubuntu-latest @@ -56,10 +42,27 @@ jobs: - run: pip install -e .[dev] - 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: name: Merge dev → testing runs-on: ubuntu-latest - needs: [lint, test, bandit, pip-audit] + needs: test if: github.ref == 'refs/heads/dev' steps: - uses: actions/checkout@v4 @@ -74,13 +77,13 @@ jobs: run: | git fetch origin 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 open-pr: name: Open PR to main runs-on: ubuntu-latest - needs: [lint, test, bandit, pip-audit] + needs: test if: github.ref == 'refs/heads/testing' steps: - name: Open PR via Gitea API