ci: skip the build/test matrix for documentation-only pull requests - #3932
Open
lvkale wants to merge 1 commit into
Open
ci: skip the build/test matrix for documentation-only pull requests#3932lvkale wants to merge 1 commit into
lvkale wants to merge 1 commit into
Conversation
A change touching only doc/ currently runs the entire CI matrix (17 build-and-test jobs, up to 90 minutes each), which wastes compute and discourages documentation contributions. This adds a first job that diffs the PR against its merge base and reports whether anything outside doc/ changed. Every build/test job now depends on that output; for documentation-only PRs they conclude as "skipped", which satisfies required status checks, and only the doc job (the sphinx build, the check that actually validates such a change) does real work. merge_group events always report non_doc=true, so the merge queue still runs the full matrix as the final gate before landing. Code PRs are unaffected apart from one small detection job at the front.
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.
A pull request touching only doc/ currently runs the entire CI matrix (17 build-and-test jobs, up to 90 minutes each). That wastes compute and, more importantly, discourages documentation changes — a small manual fix should not carry the cost of a full acceptance run.
Mechanism:
changes) diffs the PR against its merge base and outputs whether anything outside doc/ changed.needs: changesand anif:on that output. For documentation-only PRs they conclude as skipped, which satisfies required status checks (unlike workflow-levelpaths-ignore, which leaves required checks unreported and blocks merging).docjob (sphinx build) always runs — it is the check that actually validates a documentation change.merge_groupevents always reportnon_doc=true, so the merge queue still runs the full matrix as the final gate before anything lands. Code PRs are unaffected apart from the one small detection job.Example of the class of PR this helps: #3931 (a 47-line manual change currently running the full matrix).
🤖 Generated with Claude Code