ci: skip the test matrix when no code paths change - #18
Merged
Conversation
Docs-only pull requests currently run the full six-job matrix across two Python versions and three test splits. Gate it behind a paths-filter, the same approach docs.yaml already uses. pre-commit stays unfiltered because pre-commit/action runs every hook over all files, so it is meaningful for any change. The `ci` gate now tolerates a skipped tests job, since the branch ruleset requires that check and a skipped dependency would otherwise fail it. It also asserts that `changes` itself succeeded, so a failure there cannot pass the gate by silently skipping tests. Co-Authored-By: Claude <noreply@anthropic.com>
lan496
marked this pull request as ready for review
September 6, 2026 07:57
lan496
enabled auto-merge
September 6, 2026 07:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
changesjob toci.yamlusingdorny/paths-filter, mirroring the pattern already indocs.yaml.testsmatrix only when code paths change:src/**,tests/**,pyproject.toml,uv.lock,.test_durations, orci.yamlitself.cigate job to accept a skippedtestsjob.A docs-only pull request currently runs six test jobs (two Python versions x three splits). After this it runs none of them, while
pre-commitstill covers the change.Why pre-commit stays unfiltered
pre-commit/actionruns every hook over all files, so it is meaningful for any change including pure documentation. Leaving it ungated also guarantees thecigate always has at least one real signal behind it rather than passing on an all-skipped workflow.The gate change is the risky part
ciis the required status check in the repository's branch ruleset, so it must report success on a docs-only PR wheretestsis skipped.test "skipped" = successwould fail and block every docs PR, hence:needs.changes.resultis asserted separately. Without it, a failure in thechangesjob would skiptests, and the relaxed check would then read that skip as acceptable and pass the gate.Test plan
.github/workflows/ci.yaml, which is in the filter, so the full matrix should run andcishould passtestsis skipped andcistill reports successcicheck goes green in both cases[Claude Code] Generated with Claude Code