Add NetAnalyzers conditional test scope#55397
Merged
MichaelSimons merged 1 commit intoJul 21, 2026
Merged
Conversation
Skips NetAnalyzers tests on PRs that don't touch relevant source. Trigger paths cover the analyzer source (src/Microsoft.CodeAnalysis.NetAnalyzers/**). Adds eng/Version.Details.xml as a global trigger path so that any dependency update (VMR or testfx) forces all scopes to run. Dependency flows are broad, wide-reaching changes worth validating fully, and making this global is safe-by-default for future scopes. Documents this decision and records why a finer-grained per-repo RunAlways=Dependency mechanism is intentionally not supported yet (no ROI given only two dependency flows today). Trigger paths are listed in alphabetical order for readability, and that convention is noted in the props file. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f5bbf7c3-1a14-4d0d-bef5-a0641df6dc67
|
Azure Pipelines: Successfully started running 2 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new conditional test scope for the NetAnalyzers test projects so they can be skipped on PRs that don’t touch analyzer sources, and expands the “global triggers” so dependency updates force the full conditional-test set to run.
Changes:
- Added a
NetAnalyzersConditionalTestScope(project-level) keyed offsrc/Microsoft.CodeAnalysis.NetAnalyzers/**. - Added
eng/Version.Details.xmltoGlobalTriggerPathsto disable conditional filtering on dependency-update PRs. - Updated the PR test filtering documentation to clarify
RunAlwaysbehavior and document dependency-flow handling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/ConditionalTests.props | Adds NetAnalyzers scope and a global trigger for eng/Version.Details.xml; updates header guidance on ordering. |
| documentation/project-docs/pr-test-filtering.md | Documents RunAlways limitations and explains the dependency-flow rationale for the new global trigger. |
tannergooding
approved these changes
Jul 21, 2026
nagilson
approved these changes
Jul 21, 2026
Member
Author
|
Build analysis appears hung - all legs passed - merging. |
MichaelSimons
deleted the
michaelsimons-netanalyzers-conditional-test-scope
branch
July 21, 2026 22:03
This was referenced Jul 22, 2026
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.
Summary
Adds a
NetAnalyzersscope to the PR conditional test filtering framework so that NetAnalyzers tests are skipped on PRs that don't touch the analyzer source. Also makeseng/Version.Details.xmla global trigger path so any dependency update forces the full suite to run.Changes
test/ConditionalTests.propsNetAnalyzersConditionalTestScope(Mechanism=project) coveringsrc/Microsoft.CodeAnalysis.NetAnalyzers/tests/**/*.csproj, triggered by changes undersrc/Microsoft.CodeAnalysis.NetAnalyzers/**, withRunAlways=CI.eng/Version.Details.xmltoGlobalTriggerPathsso any dependency update (VMR or external flows likemicrosoft/testfx) forces all scopes to run.documentation/project-docs/pr-test-filtering.mdRunAlwayssupports onlyCItoday.eng/Version.Details.xmlis a global trigger.RunAlways=Dependency:<owner>/<repo>condition and why it wasn't adopted.Related to #55203