[CI] Add PR validation on macOS#9287
Merged
danmoseley merged 3 commits intodotnet:mainfrom May 14, 2025
Merged
Conversation
This is reverting "Revert "[CI] Add PR validation on macOS (dotnet#9175)" (dotnet#9208)" commit e5b2802. This is from the original commit message: * [tests] Run tests workflow on macos * Adjust RequiresDocker and RequiresSSLCertificate to skip macos * Disable tests failing on macos * Don't override DOTNET_ROOT when getting list of tests * Skip playground tests on windows and macos .. and add RunOnGithubActionsMacOS * Update runsheet runners * fixup! Update runsheet runners * fixup! Update runsheet runners * Address review feedback from @ russkie * Address review feedback from @ russkie - skip E2E tests on macos as they .. are timing out. Issue: dotnet#9198 * Add missing CI: false for outerloop test runs Fixes ``` /home/runner/work/aspire/aspire/eng/Versions.targets(49,67): error MSB4057: The target "GitInfo" does not exist in the project. [/home/runner/work/aspire/aspire/src/Microsoft.Extensions.ServiceDiscovery.Abstractions/Microsoft.Extensions.ServiceDiscovery.Abstractions.csproj] /home/runner/work/aspire/aspire/eng/Versions.targets(49,67): error MSB4057: The target "GitInfo" does not exist in the project. [/home/runner/work/aspire/aspire/src/Microsoft.Extensions.ServiceDiscovery.Abstractions/Microsoft.Extensions.ServiceDiscovery.Abstractions.csproj] /home/runner/work/aspire/aspire/eng/Versions.targets(49,67): error MSB4057: The target "GitInfo" does not exist in the project. [/home/runner/work/aspire/aspire/src/Tools/ConfigurationSchemaGenerator/ConfigurationSchemaGenerator.csproj] /home/runner/work/aspire/aspire/eng/Versions.targets(49,67): error MSB4057: The target "GitInfo" does not exist in the project. [/home/runner/work/aspire/aspire/src/Microsoft.Extensions.ServiceDiscovery.Abstractions/Microsoft.Extensions.ServiceDiscovery.Abstractions.csproj] /home/runner/work/aspire/aspire/eng/Versions.targets(49,67): error MSB4057: The target "GitInfo" does not exist in the project. [/home/runner/work/aspire/aspire/src/Tools/ConfigurationSchemaGenerator/ConfigurationSchemaGenerator.csproj] ``` * Add macos to the quarantined tests report generator --------- Co-authored-by: Igor Velikorossov <igor.velikorossov@microsoft.com> Co-authored-by: Igor Velikorossov <RussKie@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR reintroduces and extends CI support for macOS by updating test conditions, build targets, and GitHub workflows. Key changes include updating platform detection and test conditions to include macOS, adding macOS-specific properties and targets, and modifying workflow definitions to run tests on macOS.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Directory.Build.targets | Updated Exec command and test project conditions for macOS |
| tests/Aspire.TestUtilities/RequiresSSLCertificateAttribute.cs | Adjusted SSL certificate support logic to account for Linux/CI |
| tests/Aspire.TestUtilities/RequiresDockerAttribute.cs | Modified Docker support condition to restrict to Linux/CI |
| tests/Aspire.TestUtilities/PlatformDetection.cs | Introduced IsMacOS helper for platform detection |
| tests/Aspire.Templates.Tests/BuildAndRunTemplateTests.cs | Added ActiveIssue for macOS platform-specific test handling |
| tests/Aspire.Playground.Tests/Aspire.Playground.Tests.csproj | Added macOS property and updated test runner command |
| tests/Aspire.EndToEnd.Tests/Aspire.EndToEnd.Tests.csproj | Added macOS property for GitHub Actions integration |
| tests/Aspire.Dashboard.Tests/Integration/Playwright/AppBarTests.cs | Updated test attribute for macOS active issue handling |
| tests/Aspire.Dashboard.Tests/FormatHelpersTests.cs | Added ActiveIssue for macOS test case |
| eng/Testing.targets, eng/Testing.props | Updated configuration to include macOS properties |
| eng/TestRunsheetBuilder/TestRunsheetBuilder.targets | Added macOS-specific files, target definitions, and Exec command |
| eng/QuarantinedTestRunsheetBuilder/QuarantinedTestRunsheetBuilder.targets | Added macOS-specific runsheet properties and Exec command |
| .github/workflows/tests.yml, tests-outerloop.yml, run-tests.yml, .github/actions/enumerate-tests/action.yml | Extended workflows and actions to support macOS for test runs |
danmoseley
reviewed
May 14, 2025
|
|
||
| [Fact] | ||
| [QuarantinedTest("https://github.com/dotnet/aspire/issues/9152")] | ||
| [ActiveIssue("https://github.com/dotnet/aspire/issues/9152", typeof(PlatformDetection), nameof(PlatformDetection.IsMacOS))] |
Member
There was a problem hiding this comment.
so it passes reliably on win/lin now?
danmoseley
approved these changes
May 14, 2025
Member
|
cc @davidfowl adding macOS validation to PR's -- if it's not stable we'll disable it but running on mac is core scenario for us |
radical
added a commit
to radical/aspire
that referenced
this pull request
May 15, 2025
…otnet#9336)" The earlier revert was incorrect. That wasn't commit responsible for breaking the build. It was: ``` commit 6ca2de9 Author: Ankit Jain <radical@gmail.com> Date: Wed May 14 11:39:18 2025 -0400 [CI] Add PR validation on macOS (dotnet#9287) ``` This reverts commit 3850afa.
radical
added a commit
to radical/aspire
that referenced
this pull request
May 15, 2025
## What broke?
Template tests run `dotnet test --list-tests` to get the list of tests so they can
be run on separate helix jobs. This run of `dotnet` failed the builds on
azdo with:
```
You must install or update .NET to run this application.
App: /mnt/vss/_work/1/s/artifacts/bin/Aspire.Templates.Tests/Release/net8.0/Aspire.Templates.Tests
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: /usr/lib/dotnet
The following frameworks were found:
6.0.36 at [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=x64&rid=ubuntu.22.04-x64
/mnt/vss/_work/1/s/tests/Directory.Build.targets(39,5): error MSB3073: The command ""/mnt/vss/_work/1/s/artifacts/bin/Aspire.Templates.Tests/Release/net8.0/Aspire.Templates.Tests" --filter-no>
##[error]tests/Directory.Build.targets(39,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command ""/mnt/vss/_work/1/s/artifacts/bin/Aspire.Templates.Tests/Release/net8.0/Aspire>
```
## Why did it break?
[1] added a change where that `dotnet test` was run with
`EnvironmentVariables="DOTNET_ROOT=$(DotNetRoot);DOTNET_ROOT_X86=$(DotNetRoot)x86"`,
so it does not use the system dotnet. This helped on Azdo builds where
we have older system dotnet (6.0x).
Then [2] removed that change so the system dotnet on github actions
could be used because a newer one was being installed. But this now
broke the Azdo builds.
To fix this set the DOTNET_ROOT on Azdo builds, so the correct dotnet is
used.
References:
1.
commit 0af9e78
Author: Youssef Victor <youssefvictor00@gmail.com>
Date: Sat Apr 19 14:34:54 2025 +0200
Revert to MTP and disable server capability as a workaround (dotnet#8833)
2.
```
commit 6ca2de9
Author: Ankit Jain <radical@gmail.com>
Date: Wed May 14 11:39:18 2025 -0400
[CI] Add PR validation on macOS (dotnet#9287)
```
radical
added a commit
that referenced
this pull request
May 15, 2025
## What broke?
Template tests run `dotnet test --list-tests` to get the list of tests so they can
be run on separate helix jobs. This run of `dotnet` failed the builds on
azdo with:
```
You must install or update .NET to run this application.
App: /mnt/vss/_work/1/s/artifacts/bin/Aspire.Templates.Tests/Release/net8.0/Aspire.Templates.Tests
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: /usr/lib/dotnet
The following frameworks were found:
6.0.36 at [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=x64&rid=ubuntu.22.04-x64
/mnt/vss/_work/1/s/tests/Directory.Build.targets(39,5): error MSB3073: The command ""/mnt/vss/_work/1/s/artifacts/bin/Aspire.Templates.Tests/Release/net8.0/Aspire.Templates.Tests" --filter-no>
##[error]tests/Directory.Build.targets(39,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command ""/mnt/vss/_work/1/s/artifacts/bin/Aspire.Templates.Tests/Release/net8.0/Aspire>
```
## Why did it break?
[1] added a change where that `dotnet test` was run with
`EnvironmentVariables="DOTNET_ROOT=$(DotNetRoot);DOTNET_ROOT_X86=$(DotNetRoot)x86"`,
so it does not use the system dotnet. This helped on Azdo builds where
we have older system dotnet (6.0x).
Then [2] removed that change so the system dotnet on github actions
could be used because a newer one was being installed. But this now
broke the Azdo builds.
To fix this set the DOTNET_ROOT on Azdo builds, so the correct dotnet is
used.
References:
1.
commit 0af9e78
Author: Youssef Victor <youssefvictor00@gmail.com>
Date: Sat Apr 19 14:34:54 2025 +0200
Revert to MTP and disable server capability as a workaround (#8833)
2.
```
commit 6ca2de9
Author: Ankit Jain <radical@gmail.com>
Date: Wed May 14 11:39:18 2025 -0400
[CI] Add PR validation on macOS (#9287)
```
radical
added a commit
that referenced
this pull request
May 15, 2025
* [CI] Fix azdo builds for `main`
## What broke?
Template tests run `dotnet test --list-tests` to get the list of tests so they can
be run on separate helix jobs. This run of `dotnet` failed the builds on
azdo with:
```
You must install or update .NET to run this application.
App: /mnt/vss/_work/1/s/artifacts/bin/Aspire.Templates.Tests/Release/net8.0/Aspire.Templates.Tests
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: /usr/lib/dotnet
The following frameworks were found:
6.0.36 at [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=x64&rid=ubuntu.22.04-x64
/mnt/vss/_work/1/s/tests/Directory.Build.targets(39,5): error MSB3073: The command ""/mnt/vss/_work/1/s/artifacts/bin/Aspire.Templates.Tests/Release/net8.0/Aspire.Templates.Tests" --filter-no>
##[error]tests/Directory.Build.targets(39,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command ""/mnt/vss/_work/1/s/artifacts/bin/Aspire.Templates.Tests/Release/net8.0/Aspire>
```
## Why did it break?
[1] added a change where that `dotnet test` was run with
`EnvironmentVariables="DOTNET_ROOT=$(DotNetRoot);DOTNET_ROOT_X86=$(DotNetRoot)x86"`,
so it does not use the system dotnet. This helped on Azdo builds where
we have older system dotnet (6.0x).
Then [2] removed that change so the system dotnet on github actions
could be used because a newer one was being installed. But this now
broke the Azdo builds.
To fix this set the DOTNET_ROOT on Azdo builds, so the correct dotnet is
used.
References:
1.
commit 0af9e78
Author: Youssef Victor <youssefvictor00@gmail.com>
Date: Sat Apr 19 14:34:54 2025 +0200
Revert to MTP and disable server capability as a workaround (#8833)
2.
```
commit 6ca2de9
Author: Ankit Jain <radical@gmail.com>
Date: Wed May 14 11:39:18 2025 -0400
[CI] Add PR validation on macOS (#9287)
```
* Quarantine BrowserTokenAuthenticationTests.BrowserToken_LoginPage_Success_RedirectToResources
Issue: #9345
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is reverting "Revert "[CI] Add PR validation on macOS (#9175)" (#9208)" commit e5b2802.
This is from the original commit message:
[tests] Run tests workflow on macos
Adjust RequiresDocker and RequiresSSLCertificate to skip macos
Disable tests failing on macos
Don't override DOTNET_ROOT when getting list of tests
Skip playground tests on windows and macos
.. and add RunOnGithubActionsMacOS
Update runsheet runners
fixup! Update runsheet runners
fixup! Update runsheet runners
Address review feedback from @ russkie
Address review feedback from @ russkie - skip E2E tests on macos as they
.. are timing out.
Issue: #9198
Fixes
Co-authored-by: Igor Velikorossov igor.velikorossov@microsoft.com
Co-authored-by: Igor Velikorossov RussKie@users.noreply.github.com