From 7935b61c2ce2b19c9ace9cfff12efb2204017ffc Mon Sep 17 00:00:00 2001 From: rtibblesbot Date: Thu, 24 Sep 2026 23:36:29 -0700 Subject: [PATCH 1/2] ci: drop path-less pre_job from pre-commit.yml Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/pre-commit.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index dc0e0ac..dbaa096 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -5,21 +5,8 @@ on: - main pull_request: jobs: - pre_job: - name: Path match check - runs-on: ubuntu-latest - # Map a step output to a job output - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - with: - github_token: ${{ github.token }} linting: name: All file linting - needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 From 3cf0eed8b056e8346e03a818d73baa4e0e794891 Mon Sep 17 00:00:00 2001 From: rtibblesbot Date: Thu, 24 Sep 2026 23:36:29 -0700 Subject: [PATCH 2/2] ci: gate Python tests at job level behind a Python tests check Replaces fkirc/skip-duplicate-actions with dorny/paths-filter. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/pythontest.yml | 36 +++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pythontest.yml b/.github/workflows/pythontest.yml index 045ad8a..b4eba61 100644 --- a/.github/workflows/pythontest.yml +++ b/.github/workflows/pythontest.yml @@ -10,16 +10,23 @@ jobs: runs-on: ubuntu-latest # Map a step output to a job output outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} + python: ${{ steps.filter.outputs.python }} steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@master + # paths-filter needs a checkout to diff push events + - uses: actions/checkout@v7 + - id: filter + uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 with: - github_token: ${{ github.token }} - paths: '["**.py", ".github/workflows/pythontest.yml", "pyproject.toml", "uv.lock"]' + filters: | + python: + - '**.py' + - '.github/workflows/pythontest.yml' + - 'pyproject.toml' + - 'uv.lock' unit_test: name: Python unit tests needs: pre_job + if: ${{ needs.pre_job.outputs.python == 'true' }} runs-on: ubuntu-latest strategy: max-parallel: 5 @@ -27,21 +34,19 @@ jobs: python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v7 - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} with: fetch-depth: 0 - name: Set up uv - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} uses: astral-sh/setup-uv@v7 with: enable-cache: true cache-python: true - name: Run tests - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} run: uv run --python ${{ matrix.python-version }} --group test pytest unit_test_eol_python: name: Python unit tests for EOL Python versions needs: pre_job + if: ${{ needs.pre_job.outputs.python == 'true' }} runs-on: ubuntu-latest strategy: max-parallel: 5 @@ -51,12 +56,23 @@ jobs: image: python:${{ matrix.python-version }}-buster steps: - uses: actions/checkout@v7 - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} - name: Install dependencies and run tests - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} env: PYTHONPATH: ${{ github.workspace }} run: | python -m pip install --upgrade pip pip install "pytest>=6.2.5,<8" "jsonschema==3.2.0" pytest + # Branch protection requires this; skipped matrix jobs report no per-version checks. + required_checks: + name: Python tests + needs: + - pre_job + - unit_test + - unit_test_eol_python + if: always() + runs-on: ubuntu-latest + steps: + - name: Fail if any needed job failed or was cancelled + if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') + run: exit 1