ci: add affected-crate detection to skip unchanged tests#14106
Closed
Rani367 wants to merge 1 commit intofoundry-rs:masterfrom
Closed
ci: add affected-crate detection to skip unchanged tests#14106Rani367 wants to merge 1 commit intofoundry-rs:masterfrom
Rani367 wants to merge 1 commit intofoundry-rs:masterfrom
Conversation
7c0d7e5 to
6e504b2
Compare
Add affected CLI integration to detect which crates are impacted by a PR and run tests only for those crates. This runs alongside existing CI workflows without replacing them.
6e504b2 to
daf70fb
Compare
Member
|
Thanks for your suggestion, I'll reconsider this but for now decided against it. |
Author
|
No worries, thanks for considering it. |
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.
Problem
This repo has 36 crates in its Cargo workspace. The current CI uses a custom
matrices.pyto partition tests, but it doesn't filter which crates need testing based on what changed.I analyzed the last 15 commits on
master:e2b2529f4a6885179b8f7Example — an EVM change affects 9 of 36 crates with full dependency chains:
What this PR adds
.affected.toml— config file (ignores docs/markdown/CI/testdata files).github/workflows/affected-test.yml— experimental workflow that:affected cicargo nextest run -p <crate>per affected crateThis complements
matrices.pyby narrowing which crates enter the matrix, rather than partitioning all 36.This runs alongside existing CI — it does NOT replace anything.
What
affectedisaffected— single 5MB Rust binary, zero config, MIT licensed. Auto-detects Cargo workspaces. Has a GitHub Action and PR comment bot.