Harden affected test selection for example changes#1415
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1415Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1415" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines the eng/testing/select-affected-tests.cs “affected test” selector so that changes to non-project files under examples/** (e.g., examples/<name>/.gitignore) can be mapped to tests associated with projects under that example, instead of immediately falling back to running the full test matrix.
Changes:
- Adds example-scoped test selection by deriving the example root from the changed file path and selecting tests mapped to projects under that example.
- Preserves the existing “run full matrix” fallback when an example change can’t be mapped to any impacted tests.
Show a summary per file
| File | Description |
|---|---|
| eng/testing/select-affected-tests.cs | Adds TryGetExampleTests and integrates it into the selection flow to avoid full-matrix fallback for resolvable examples/** changes. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
Contributor
Minimum allowed line rate is |
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.
Closes #<ISSUE_NUMBER>
N/A
This hardens the affected-test selector so non-project files under
examples/**, such as a new example.gitignore, no longer force the entire integration test matrix to run.The selector now derives the example root from the changed path, gathers the projects under that example, and reuses the existing dependency graph to select only the tests tied to those example projects. It still falls back to the full matrix when an example change cannot be resolved to any affected tests.
PR Checklist
Other information
This is intentionally narrow: it only changes the fallback behavior for unmapped
examples/**files and preserves the existing full-matrix fallback for truly ambiguous inputs.