ci: only run each test workflow when the paths it exercises change - #1698
Merged
Merged
Conversation
…change
Six pull_request test workflows ran on every PR regardless of what
changed. gateway-check.yml already scopes itself to gateway/**; this
gives the rest the same treatment, sized to what each one really
compiles or reads (traced through the cargo commands and the crate
graph: shared <- lsp <- ast <- standalone/skill/cli, with cli as its
own workspace):
- rust-test, rust-test-lsp `cargo test -p ast --lib`
paths: ast, lsp, shared, root Cargo.toml/lock, self
- rust-test-cli cli integration suite
paths: cli, ast, lsp, shared, self
- standalone-test `cargo test` over the whole root workspace
paths-ignore: gateway, notes, cli, *.md
- e2e-test, e2e-standalone index/standalone binary + mcp node server
paths-ignore: gateway, notes, cli, skill, *.md
The three cross-cutting workflows use paths-ignore rather than an
include list because their real input set is nearly the whole repo;
the failure mode of an ignore list is an unnecessary run, not a
missed one. Each include-list workflow lists its own file so edits
to the workflow still test themselves (same as gateway-check).
main has no branch protection or rulesets, so a workflow that does
not run for a PR simply does not appear; there is no required-check
that could be left pending.
Co-Authored-By: Claude <noreply@anthropic.com>
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.
Six `pull_request` test workflows ran on every PR regardless of what changed. `gateway-check.yml` already scopes itself to `gateway/**`; this gives the other six the same treatment, sized to what each actually compiles or reads.
The three cross-cutting workflows use `paths-ignore` because their real input set is nearly the whole repo; an ignore list fails toward an unnecessary run rather than a missed one. Each include-list workflow lists its own file so workflow edits still test themselves.
Safety: `main` has no branch protection or rulesets, so a skipped workflow just doesn't appear on the PR. If required status checks are ever added, path-filtered workflows will need a no-op fallback or the filter moved to job level, otherwise the required check sits pending forever.
Self-check: this PR only touches workflow files. Under the new filters the six edited workflows should run (three include their own file, three don't ignore `.github/`) and `gateway-check` should be skipped.