-
Notifications
You must be signed in to change notification settings - Fork 690
[CI] Add PR validation on macOS #9287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <[email protected]> Co-authored-by: Igor Velikorossov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
@@ -65,7 +65,7 @@ await AsyncTestHelpers.AssertIsTrueRetryAsync( | |||
} | |||
|
|||
[Fact] | |||
[QuarantinedTest("https://github.com/dotnet/aspire/issues/9152")] | |||
[ActiveIssue("https://github.com/dotnet/aspire/issues/9152", typeof(PlatformDetection), nameof(PlatformDetection.IsMacOS))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so it passes reliably on win/lin now?
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 |
…otnet#9336)" The earlier revert was incorrect. That wasn't commit responsible for breaking the build. It was: ``` commit 6ca2de9 Author: Ankit Jain <[email protected]> Date: Wed May 14 11:39:18 2025 -0400 [CI] Add PR validation on macOS (dotnet#9287) ``` This reverts commit 3850afa.
## 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 <[email protected]> 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 <[email protected]> Date: Wed May 14 11:39:18 2025 -0400 [CI] Add PR validation on macOS (dotnet#9287) ```
## 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 <[email protected]> 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 <[email protected]> Date: Wed May 14 11:39:18 2025 -0400 [CI] Add PR validation on macOS (#9287) ```
#9337) The earlier revert was incorrect. That wasn't commit responsible for breaking the build. It was: ``` commit 6ca2de9 Author: Ankit Jain <[email protected]> Date: Wed May 14 11:39:18 2025 -0400 [CI] Add PR validation on macOS (#9287) ``` This reverts commit 3850afa.
* [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 <[email protected]> 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 <[email protected]> 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 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 [email protected]
Co-authored-by: Igor Velikorossov [email protected]