From dd1da858233882758ef3ce1a9546fb613707a695 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 12 Aug 2026 08:15:25 +0100 Subject: [PATCH] Pin the coverage version used by the coverage gate The "Combine & check coverage" job installed coverage with "uv tool install", which resolves the latest release at run time and ignores the project's pin of coverage==7.15.4. It was the only unpinned tool install across the workflows, and it is a required check on the default branch, so its behaviour was decided by whatever coverage released most recently. Run it through "uv run --extra=dev" like every other tool invocation, so the same version produces and consumes the coverage data. Also add "|| true" to the first report call. Under "bash -e" it already failed the step when coverage was under 100%, so the second call - the one the comment says is the gate - was unreachable in exactly the case it exists for. Closes #3402 Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/test.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 519e5006a..927f7d41c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -328,16 +328,15 @@ jobs: - name: Require 100% Coverage id: coverage run: | - uv tool install 'coverage[toml]' + uv run --extra=dev coverage combine + uv run --extra=dev coverage html --skip-covered --skip-empty - coverage combine - coverage html --skip-covered --skip-empty - - # Report and write to summary. - coverage report --format=markdown >> "$GITHUB_STEP_SUMMARY" + # Report and write to summary, without failing yet. + uv run --extra=dev coverage report --format=markdown \ + >> "$GITHUB_STEP_SUMMARY" || true # Report again and fail if under 100%. - coverage report + uv run --extra=dev coverage report - name: Upload HTML report if check failed uses: actions/upload-artifact@v7