[release/13.2][CI] Use large runner for Aspire.Hosting.Tests#15016
Merged
radical merged 5 commits intorelease/13.2from Mar 6, 2026
Merged
[release/13.2][CI] Use large runner for Aspire.Hosting.Tests#15016radical merged 5 commits intorelease/13.2from
radical merged 5 commits intorelease/13.2from
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15016Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15016" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the CI test matrix pipeline to support per-OS custom GitHub Actions runners (flowing from MSBuild → metadata JSON → canonical matrix → GitHub expansion), and updates run-tests.yml to use runner.os for OS detection so custom runner names don’t break conditional logic.
Changes:
- Add optional
runnerspassthrough in test metadata/canonical matrix and apply OS-specificruns-onoverrides during GitHub matrix expansion. - Switch OS detection in
run-tests.ymlfrominputs.osrunner-name matching torunner.os(Linux/Windows/macOS). - Use
8-core-ubuntu-latestfor the Linux CLI native archive build job.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Infrastructure.Tests/Shared/TestDataBuilder.cs | Extends test metadata and canonical matrix test helpers to include optional runners. |
| tests/Infrastructure.Tests/PowerShellScripts/BuildTestMatrixTests.cs | Adds coverage ensuring runners is preserved/omitted correctly in canonical matrix generation. |
| tests/Infrastructure.Tests/PowerShellScripts/ExpandTestMatrixGitHubTests.cs | Adds coverage ensuring OS-specific runs-on uses custom runners where configured. |
| eng/scripts/build-test-matrix.ps1 | Passes runners through from metadata into canonical matrix entries (regular + split entries). |
| eng/scripts/expand-test-matrix-github.ps1 | Applies OS-specific custom runner override when expanding to GitHub matrix entries. |
| eng/Testing.targets | Documents new MSBuild properties for per-OS GitHub runner overrides. |
| eng/TestEnumerationRunsheetBuilder/TestEnumerationRunsheetBuilder.targets | Emits optional runners object into .tests-metadata.json when overrides are configured. |
| docs/ci/TestingOnCI.md | Documents the new runners metadata and how to configure custom runners in projects. |
| .github/workflows/run-tests.yml | Uses runner.os for OS-based branching instead of matching runner name strings. |
| .github/workflows/build-cli-native-archives.yml | Switches Linux CLI archive build to 8-core-ubuntu-latest. |
tests/Infrastructure.Tests/PowerShellScripts/ExpandTestMatrixGitHubTests.cs
Outdated
Show resolved
Hide resolved
eng/TestEnumerationRunsheetBuilder/TestEnumerationRunsheetBuilder.targets
Show resolved
Hide resolved
Contributor
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22781553382 |
Allow test projects to override GitHub Actions runners per OS via MSBuild properties (GithubActionsRunnerWindows/Linux/MacOS). The custom runners flow through metadata JSON → canonical matrix → GitHub expansion, falling back to defaults when unset. Also switch run-tests.yml OS detection from inputs.os string matching to runner.os, which works correctly with non-standard runner names. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+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>
eerhardt
approved these changes
Mar 6, 2026
eerhardt
pushed a commit
to eerhardt/aspire
that referenced
this pull request
Mar 7, 2026
…ft#15016) * Add per-OS custom GitHub runner support to test matrix Allow test projects to override GitHub Actions runners per OS via MSBuild properties (GithubActionsRunnerWindows/Linux/MacOS). The custom runners flow through metadata JSON → canonical matrix → GitHub expansion, falling back to defaults when unset. Also switch run-tests.yml OS detection from inputs.os string matching to runner.os, which works correctly with non-standard runner names. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * build cli with 8core * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Use 8-core Ubuntu runner for Aspire.Hosting.Tests in CI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix IDE2000: remove multiple blank lines Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI
pushed a commit
that referenced
this pull request
Mar 10, 2026
* Add per-OS custom GitHub runner support to test matrix Allow test projects to override GitHub Actions runners per OS via MSBuild properties (GithubActionsRunnerWindows/Linux/MacOS). The custom runners flow through metadata JSON → canonical matrix → GitHub expansion, falling back to defaults when unset. Also switch run-tests.yml OS detection from inputs.os string matching to runner.os, which works correctly with non-standard runner names. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * build cli with 8core * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Use 8-core Ubuntu runner for Aspire.Hosting.Tests in CI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix IDE2000: remove multiple blank lines Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Adds per-OS custom GitHub Actions runner support to the test matrix and uses it to run
Aspire.Hosting.Testson an 8-core Ubuntu runner for faster CI.Changes:
Per-OS custom runner support — Test projects can now override GitHub Actions runners per OS via MSBuild properties (
GithubActionsRunnerWindows,GithubActionsRunnerLinux,GithubActionsRunnerMacOS). Custom runners flow through metadata JSON → canonical matrix → GitHub expansion, falling back to defaults when unset.runner.osinstead ofinputs.os—run-tests.ymlnow usesrunner.os(Linux/Windows/macOS) instead of matching against hardcoded runner names likeubuntu-latest. This is necessary for custom runners to work correctly.8-core runner for Aspire.Hosting.Tests — Configures
Aspire.Hosting.Teststo run on8-core-ubuntu-lateston Linux for faster test execution.8-core runner for Linux CLI build — Upgrades the Linux CLI archive build runner from
ubuntu-latestto8-core-ubuntu-latest.Includes unit tests for the runner passthrough in
BuildTestMatrixTests.csandExpandTestMatrixGitHubTests.cs, and updatesdocs/ci/TestingOnCI.mdwith documentation for the new MSBuild properties.Checklist