Reduce PR validation jobs and clean up test scheduling#15031
Reduce PR validation jobs and clean up test scheduling#15031radical wants to merge 6 commits intorelease/13.2from
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15031Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15031" |
There was a problem hiding this comment.
Pull request overview
This PR consolidates test-infrastructure cleanup across the repo by standardizing on Arcade’s [OuterLoop] attribute, updating CI trait filters/scripts/docs accordingly, and centralizing some CI/MSBuild test properties (GitHub PR detection and default macOS execution behavior).
Changes:
- Replaces the custom
OuterloopTestAttributewith Arcade’s[OuterLoop]across test code and updates trait filtering fromouterloop=truetocategory=outerloop. - Adds
OuterloopTestProject=truefor Oracle EF Core tests and updates the specialized test project discovery script to include csproj-designated outerloop projects. - Centralizes CI defaults in
eng/Testing.props(GitHub PR detection and default skip-on-macOS forAspire.*projects, withAspire.Cli*excluded).
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.TestUtilities/OuterloopTestAttribute.cs | Deletes the custom outerloop trait attribute implementation. |
| tests/Aspire.Templates.Tests/StarterTemplateRunTestsBase.cs | Switches Playwright tests from [OuterloopTest] to [OuterLoop]. |
| tests/Aspire.Templates.Tests/EmptyTemplateRunTests.cs | Switches Playwright test from [OuterloopTest] to [OuterLoop]. |
| tests/Aspire.Playground.Tests/Aspire.Playground.Tests.csproj | Removes redundant macOS skip override (relies on centralized defaults). |
| tests/Aspire.Oracle.EntityFrameworkCore.Tests/AssemblyInfo.cs | Removes assembly-level outerloop marker. |
| tests/Aspire.Oracle.EntityFrameworkCore.Tests/Aspire.Oracle.EntityFrameworkCore.Tests.csproj | Adds OuterloopTestProject=true to designate the project as outerloop. |
| tests/Aspire.Hosting.Tests/DistributedApplicationTests.cs | Switches several long-running tests to [OuterLoop]. |
| tests/Aspire.Hosting.JavaScript.Tests/AddJavaScriptAppTests.cs | Switches Docker build test to [OuterLoop]. |
| tests/Aspire.EndToEnd.Tests/Aspire.EndToEnd.Tests.csproj | Removes redundant macOS skip override (relies on centralized defaults). |
| tests/Aspire.Deployment.EndToEnd.Tests/Aspire.Deployment.EndToEnd.Tests.csproj | Removes redundant macOS skip override (relies on centralized defaults). |
| tests/Aspire.Dashboard.Tests/Integration/Playwright/BrowserTokenAuthenticationTests.cs | Switches Playwright tests to [OuterLoop]. |
| tests/Aspire.Dashboard.Tests/Integration/Playwright/AppBarTests.cs | Switches Playwright test to [OuterLoop]. |
| tests/Aspire.Cli.Tests/Mcp/E2E/McpDocsE2ETests.cs | Switches E2E tests to [OuterLoop] and removes old utility using. |
| tests/Aspire.Cli.EndToEnd.Tests/PlaywrightCliInstallTests.cs | Switches E2E test class to [OuterLoop] and removes old utility using. |
| tests/Aspire.Cli.EndToEnd.Tests/McpDocsE2ETests.cs | Switches E2E tests to [OuterLoop] and removes old utility using. |
| eng/scripts/split-test-projects-for-ci.ps1 | Excludes outerloop/quarantined tests during class-based test enumeration. |
| eng/scripts/generate-specialized-test-projects-list.sh | Adds csproj-based outerloop project discovery (OuterloopTestProject). |
| eng/Testing.props | Updates outerloop trait filters, adds IsGithubPullRequest, and centralizes macOS skip defaults for Aspire.* tests. |
| docs/outerloop-tests.md | Updates documentation to [OuterLoop] and new trait filter syntax. |
| docs/ci/TestingOnCI.md | Updates CI filter documentation to category=outerloop. |
| AGENTS.md | Updates agent guidance to use the new outerloop filter syntax. |
| .github/workflows/tests.yml | Updates default test args to exclude category=outerloop. |
| .github/workflows/tests-outerloop.yml | Updates workflow to select OuterLoop attribute name and filter by category=outerloop. |
| .github/workflows/specialized-test-runner.yml | Updates attributeName description text. |
| .github/skills/test-management/SKILL.md | Updates examples to exclude category=outerloop. |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>$(AllTargetFrameworks)</TargetFrameworks> | ||
| <OuterloopTestProject>true</OuterloopTestProject> |
There was a problem hiding this comment.
OuterloopTestProject is introduced here, but nothing in the current test execution path consumes it to (a) exclude the project from regular CI runs or (b) include it in outerloop runs. As-is, outerloop workflows still filter on category=outerloop, so this project won’t run there, and it will start running in regular CI. Either tag the tests with [OuterLoop] (assembly/class/method) or update the MSBuild/test runner logic to treat OuterloopTestProject=true as an outerloop designation (skip in normal runs, run without trait filtering in outerloop runs).
| <OuterloopTestProject>true</OuterloopTestProject> |
| attributeName: "OuterLoop" | ||
| extraRunSheetBuilderArgs: "-p:RunOuterloopTests=true" | ||
| extraTestArgs: "--filter-trait outerloop=true" | ||
| extraTestArgs: "--filter-trait category=outerloop" |
There was a problem hiding this comment.
With the move to OuterloopTestProject=true (csproj-based outerloop designation), always passing --filter-trait category=outerloop here will prevent those projects from running unless every test is still tagged with the outerloop trait. If the intent is to allow “entire project is outerloop” semantics, consider removing this trait filter from the workflow and letting MSBuild/props decide what to run for outerloop (or alternatively ensure the project’s tests are tagged with [OuterLoop]).
| extraTestArgs: "--filter-trait category=outerloop" |
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22794595902 |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Description
This change reduces the jobs we run during PR validation and fixes unnecessary jobs that were still being scheduled because of test-enumeration mismatches.
This PR is organized into five focused commits while preserving the same final tree:
Exclude outerloop and quarantined tests from class enumeration
split-test-projects-for-ci.ps1so class-based partition discovery does not enumerate tests that regular CI already excludes.Make Aspire test macOS selection PR-aware
IsGithubPullRequestineng/Testing.propsand, for GitHub pull requests only, defaultsRunOnGithubActionsMacOS=falseforAspire.*test projects exceptAspire.Cli*unless a project explicitly overrides it.Aspire.Deployment.EndToEnd.Tests,Aspire.EndToEnd.Tests, andAspire.Playground.Tests.Prefer
OuterloopTestin repository guidanceOuterloopTestattribute.OuterloopTestin this repo instead of Arcade'sOuterLoopattribute.Require Docker for the built-in starter template test
BuildAndRunStarterTemplateBuiltInTest_Testwith the missing Docker feature requirement so CI only schedules it where Docker is available.Limit
QuarantineTools.TestsschedulingQuarantineTools.Teststo the intended GitHub Actions Linux environment to avoid unnecessary runs on other CI lanes.Must check before merge
Aspire.Oracle.EntityFrameworkCore.Tests.Aspire.Oracle.EntityFrameworkCore.Tests.