Skip to content

ci: only run each test workflow when the paths it exercises change - #1698

Merged
Evanfeenstra merged 1 commit into
mainfrom
ci/path-filtered-tests
Sep 15, 2026
Merged

Evanfeenstra merged 1 commit into
mainfrom
ci/path-filtered-tests

Conversation

@Evanfeenstra

Copy link
Copy Markdown
Collaborator

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.

Workflow Runs Trigger
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 --features neo4j` 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` 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.

…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>
@Evanfeenstra
Evanfeenstra merged commit 6d7fa2a into main Sep 15, 2026
6 checks passed
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