Repository navigation
ci: run a job on a pull request only when it changes a path the job reads - #260
Merged
Merged
Conversation
Moep90
force-pushed
the
ci/path-filtered-jobs
branch
from
October 27, 2026 19:04
14845ea to
56c59e6
Compare
Moep90
force-pushed
the
ci/path-filtered-jobs
branch
2 times, most recently
from
October 27, 2026 19:27
2ec45db to
c2fc66f
Compare
…eads A changes job diffs the pull request against its base, the way the deny job already did, and gates every other job on its own path list. A push to main, or a change to ci.yml, still runs everything. CLI-62 holds the path list. The test job also covers markdown, because docs_consistency.rs reads every markdown file. Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
Moep90
force-pushed
the
ci/path-filtered-jobs
branch
from
October 27, 2026 19:55
c2fc66f to
4e4da1c
Compare
ademariag
approved these changes
Oct 27, 2026
Moep90
pushed a commit
to Moep90/krab
that referenced
this pull request
Oct 29, 2026
ci: run a job on a pull request only when it changes a path the job reads
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.
What
On a pull request, each CI job now runs only when the change touches a path that job reads. A new
Changed pathsjob diffs the PR against its base, the same waydenyalready did, and every other job is gated on its output. A push tomain, or a PR that changesci.yml, still runs every job.The path list is in
docs/specs/cli-and-release.mdunder "Job paths", as CLI-62. CLI-29 drops its own path rule and CLI-33 addschangesto the jobsCI passeddepends on.CI passedalready counts a skipped job as passed, so branch rules keep working unchanged.Some examples: a docs-only PR runs only
test, becausedocs_consistency.rsreads every markdown file. A fixture change runstestandparity. A.github/change outsideci.ymlruns onlyzizmor.Verified
run:script from the YAML and ran it locally against sample changes. Each one turned on the jobs listed in the spec table, and a push turned on all of them.zizmor 1.31.1over.github/workflows: no findings.cargo test -p krab --test docs_consistencypasses.ci.yml, so its own CI runs every job. The skipping only shows on PRs opened or rebased after it merges.