ci: skip the build/test matrix on docs-only changes#1163
Merged
Conversation
main's branch protection requires specific job-name status checks (Style check, pgaftest / *, pytest / *). A top-level push/pull_request paths-ignore would make the whole workflow never run for a docs-only commit, leaving those required checks permanently unreported and the PR stuck -- GitHub only treats a *skipped* job as satisfying a required check, not a workflow that never ran at all. Add check_docs_only (same pattern as the existing check_base_changed job) and gate style_checker and check_base_changed on it. Every other job already transitively needs one of those two, and a job automatically skips when any of its needs was skipped, so the whole matrix cascades to skipped without extra per-job conditions.
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.
main's branch protection requires specific job-name status checks (
Style check,pgaftest / *,pytest / *). A top-levelpush/pull_requestpaths-ignorewould make the whole workflow never run for a docs-only commit, leaving those required checks permanently unreported and the PR stuck — GitHub only treats a skipped job as satisfying a required check, not a workflow that never ran at all.Adds
check_docs_only(same pattern as the existingcheck_base_changedjob) and gatesstyle_checker/check_base_changedon it. Every other job already transitivelyneedsone of those two, and a job automatically skips when any of its needs was skipped, so the whole matrix cascades toskipped(which satisfies required checks) without extra per-job conditions.Kept separate from #1162 (the docs-only PR that originally motivated this) since a PR that touches
.github/workflows/ci.ymlitself should always run full CI to validate the workflow change — bundling the two together meant #1162 could never demonstrate the skip. Once this merges, #1162 (and any future docs-only PR) will actually skip the matrix.