Skip to content

ci: skip the build/test matrix for documentation-only pull requests - #3932

Open
lvkale wants to merge 1 commit into
mainfrom
ci-skip-matrix-for-doc-only-prs
Open

ci: skip the build/test matrix for documentation-only pull requests#3932
lvkale wants to merge 1 commit into
mainfrom
ci-skip-matrix-for-doc-only-prs

Conversation

@lvkale

@lvkale lvkale commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

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:

  • A new first job (changes) diffs the PR against its merge base and outputs whether anything outside doc/ changed.
  • Every build/test job gains needs: changes and an if: on that output. For documentation-only PRs they conclude as skipped, which satisfies required status checks (unlike workflow-level paths-ignore, which leaves required checks unreported and blocks merging).
  • The doc job (sphinx build) always runs — it is the check that actually validates a documentation change.
  • merge_group events always report non_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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant