ci: run only tests affected by pull request changes - #19654
Closed
Ankit Jain (radical) wants to merge 1 commit into
Closed
Ankit Jain (radical) wants to merge 1 commit into
Ankit Jain (radical) wants to merge 1 commit into
Conversation
Pull request CI computes a relevant test subset but currently runs the full test matrix and every non-.NET test job because the selector remains in audit mode. Enable enforcement so enumerate-tests builds only selected .NET test projects and the selector gates non-.NET jobs. Keep the run-full-ci label as a kill switch that forces complete coverage. Add a workflow contract test that fails if tests.yml returns to audit mode, and update the selector design documentation to reflect the active rollout. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19654Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19654" |
Contributor
There was a problem hiding this comment.
Pull request overview
Enables selective CI enforcement so pull requests run only affected tests while retaining the run-full-ci fallback.
Changes:
- Enables test-selection enforcement in
tests.yml. - Adds a workflow contract test protecting enforcement.
- Updates selector documentation to reflect rollout completion.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/tests.yml |
Enables enforced test and job selection. |
tests/Infrastructure.Tests/TestTriggerMap/SelectTestsWorkflowTests.cs |
Verifies enforcement remains enabled. |
docs/ci/test-trigger-selector-design.md |
Documents enforcing and audit modes. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Member
Author
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.
Description
Pull request CI currently computes a relevant test subset but still runs the full test matrix and every non-.NET test job. The selector is explicitly configured with
enforce: 'false', leaving conditional test selection in audit mode.This enables enforcement so
enumerate-testsbuilds only selected .NET test projects and the selector gates non-.NET jobs. Therun-full-cilabel remains available as a kill switch that forces the complete matrix and all jobs.A workflow contract test pins enforcement to prevent an accidental return to audit mode, and the selector design documentation now reflects the active rollout state.
Validation:
Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?