Skip to content

Add ApiCompat conditional test scope - #55398

Merged
MichaelSimons merged 1 commit into
mainfrom
michaelsimons-apicompat-apidiff-test-scope
Jul 21, 2026
Merged

MichaelSimons merged 1 commit into
mainfrom
michaelsimons-apicompat-apidiff-test-scope

Conversation

@MichaelSimons

Copy link
Copy Markdown
Member

Related to #55203

Adds an ApiCompat conditional test scope to test/ConditionalTests.props so the Compatibility test suite (ApiCompat, ApiCompatibility, ApiDiff, GenAPI, ApiSymbolExtensions, PackageValidation) only runs in PR validation when relevant files change, reducing PR validation time.

Scope definition

The ApiCompat scope covers all test projects under test/Compatibility/ and triggers when any of the following change:

  • src/Compatibility/** — the compatibility source components under test
  • test/Compatibility/** — the compatibility test projects themselves
  • The three test assets consumed by these tests (ApiCompatValidateAssembliesTestProject, GenAPITaskTestProject, PackageValidationTestProject)

RunAlways is set to CI so the full suite always runs in non-PR (CI) builds.

Global dependency-flow trigger

Adds eng/Version.Details.xml to GlobalTriggerPaths so every conditional scope runs on dependency-flow PRs. This is copied from #55397 so the two PRs aren't dependent on each other; that PR adds the full documentation for the trigger.

Add an ApiCompat scope to test/ConditionalTests.props so the compatibility test
projects are skipped on PRs that don't touch compatibility code, and add
eng/Version.Details.xml as a global trigger path so dependency-flow PRs (which
update that file) keep exercising all conditional scopes.

Co-authored-by: Copilot App <[email protected]>
Copilot AI review requested due to automatic review settings July 21, 2026 18:22
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new conditional-test scope to reduce PR validation time by running the Compatibility (ApiCompat/ApiDiff/GenAPI/PackageValidation/etc.) test suite only when relevant source/tests/assets change, while ensuring full coverage on non-PR CI builds.

Changes:

  • Added ApiCompat conditional test scope targeting test/Compatibility/**/*.csproj with triggers in src/Compatibility/**, test/Compatibility/**, and specific test assets.
  • Added eng/Version.Details.xml as a GlobalTriggerPaths entry so dependency-flow updates force all conditional scopes active.

Comment thread test/ConditionalTests.props Resolved
@MichaelSimons
MichaelSimons requested review from a team and mthalman July 21, 2026 18:29
@MichaelSimons
MichaelSimons merged commit f933a93 into main Jul 21, 2026
33 checks passed
@MichaelSimons
MichaelSimons deleted the michaelsimons-apicompat-apidiff-test-scope branch July 21, 2026 22:04
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.

3 participants