From d291688c7727e7329c0dde52ecc0a19e24db7e47 Mon Sep 17 00:00:00 2001 From: Albert Callarisa Date: Mon, 27 Jul 2026 17:25:47 +0200 Subject: [PATCH] Type checking part of lint, and group build/validate statuses Signed-off-by: Albert Callarisa --- .github/workflows/build.yaml | 20 ++++++++++++++++++-- .github/workflows/run-tests.yaml | 16 ++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7d4afb4a..c5965f17 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -37,6 +37,8 @@ jobs: echo "Source files are not formatted correctly. Run 'uv run ruff check --fix && uv run ruff format'." exit 1 fi + - name: Check Typing + run: uv run mypy - name: Verify main is on a .dev version if: github.ref == 'refs/heads/main' || github.base_ref == 'main' run: | @@ -95,8 +97,6 @@ jobs: uses: astral-sh/setup-uv@v8.3.0 - name: Install dependencies run: uv sync --frozen --all-packages --group dev - - name: Check Typing - run: uv run mypy - name: Run unit-tests run: | uv run coverage run -m pytest tests -m "not e2e" --ignore=tests/integration --ignore=tests/examples --import-mode=importlib @@ -113,3 +113,19 @@ jobs: # can't silently go stale again, without letting codecov outages # block PRs or the merge queue. fail_ci_if_error: ${{ github.event_name == 'push' }} + + # Single stable check name to mark as required in branch protection, so the + # required-checks list doesn't go stale when the build matrix changes. + # Skipped required checks count as passing, hence `if: always()` plus an + # explicit result check instead of relying on `needs` alone. + build-complete: + needs: build + if: always() + runs-on: ubuntu-latest + steps: + - name: Fail unless the whole build matrix succeeded + run: | + if [ "${{ needs.build.result }}" != "success" ]; then + echo "build matrix result: ${{ needs.build.result }}" + exit 1 + fi diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 3ba403ab..7dde876a 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -119,3 +119,19 @@ jobs: - name: Validate examples run: | uv run pytest tests/examples/ + + # Single stable check name to mark as required in branch protection, so the + # required-checks list doesn't go stale when the Python version matrix + # changes. Skipped required checks count as passing, hence `if: always()` + # plus an explicit result check instead of relying on `needs` alone. + validate-complete: + needs: validate + if: always() + runs-on: ubuntu-latest + steps: + - name: Fail unless the whole validate matrix succeeded + run: | + if [ "${{ needs.validate.result }}" != "success" ]; then + echo "validate matrix result: ${{ needs.validate.result }}" + exit 1 + fi