Matrix dotnet build - #194
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #194 +/- ##
=======================================
Coverage 76.92% 76.92%
=======================================
Files 5 5
Lines 234 234
Branches 24 24
=======================================
Hits 180 180
Misses 46 46
Partials 8 8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Claude finished @simonmarty's task in 2m 16s —— View job Claude Code ReviewThanks for expanding CI coverage to Linux and multiple .NET LTS versions — this is a worthwhile improvement. Overall the change is solid; I have one correctness concern about the Windows matrix legs and a few smaller notes. I've left inline comments on the specific lines. 🔴 Windows matrix legs run redundant/identical workThe test command only appends the ${{ runner.os != 'Windows' && format('--framework net{0}.0', matrix.dotnet-version) || '' }}On Windows this evaluates to
Suggestion: either apply the framework filter on Windows too (each leg tests exactly one runtime, symmetric with Linux), or drop the 🟡
|
| # Strong name requires disabling xUnit app domains in order to get coverage using coverlet | ||
| # https://github.com/MarcoRossignoli/coverlet/blob/master/Documentation/KnownIssues.md#tests-fail-if-assembly-is-strong-named | ||
| run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" test/Amazon.SecretsManager.Extensions.Caching.UnitTests -- RunConfiguration.DisableAppDomain=true | ||
| run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" test/Amazon.SecretsManager.Extensions.Caching.UnitTests ${{ runner.os != 'Windows' && format('--framework net{0}.0', matrix.dotnet-version) || '' }} -- RunConfiguration.DisableAppDomain=true |
There was a problem hiding this comment.
The --framework filter is only applied on non-Windows, so the two Windows matrix legs do redundant work.
On Windows the conditional evaluates to '', so dotnet test runs all target frameworks (net8.0;net10.0;net48) regardless of matrix.dotnet-version. That means:
build (windows-latest, .NET 10)andbuild (windows-latest, .NET 8)execute the identical test set (all three TFMs). One of the two Windows legs is pure duplicated CI time.- The job name is misleading on Windows —
.NET 8actually runs net8.0 and net10.0 and net48. - Running
net10.0tests under the.NET 8leg relies on the .NET 10 runtime being pre-installed on the GitHub image, sincesetup-dotnetonly installs the singlematrix.dotnet-versionSDK. If the hosted image ever drops that runtime, the.NET 8Windows leg breaks.
Consider either applying the framework filter on Windows too (so each leg tests exactly one runtime, matching the Linux behavior), or dropping the dotnet-version axis for Windows and testing all TFMs in a single Windows job. Also worth installing all runtimes the test set needs rather than depending on the image's pre-installed set — e.g.:
dotnet-version: |
8
10| uses: microsoft/setup-msbuild@v3 | ||
| with: | ||
| msbuild-architecture: x64 | ||
| msbuild-architecture: ${{ runner.arch }} |
There was a problem hiding this comment.
runner.arch returns uppercase values (X86, X64, ARM, ARM64), whereas the previous hardcoded value was lowercase x64 and setup-msbuild's documented msbuild-architecture inputs are x86 / x64 / arm64. Please confirm v3 accepts X64 case-insensitively; if not, this silently mis-selects the architecture. Since the Windows runners here are always x64, a simple lowercase literal (x64) is safer than deriving from runner.arch.
|
Claude finished @simonmarty's task in 1m 35s —— View job Claude Code Review
Re-reviewed the latest state of the branch. Both issues from the previous review round have been addressed — nice work. Details below. ✅ Previously-flagged issues, now resolved
🟢 Minor notes (non-blocking)
SummaryNo blocking issues remain. The change cleanly expands CI to Linux and the two most recent .NET LTS versions, each leg does exactly the distinct work its name advertises, and the earlier correctness concerns are gone. LGTM. |
Description
Why is this change being made?
What is changing?
Related Links
Testing
How was this tested?
When testing locally, provide testing artifact(s):
Reviewee Checklist
Update the checklist after submitting the PR
If not, why:
If not, why:
If not, why:
If not, why:
If not, why: No integ test changes
If not, why:
If not, why:
If not, why:
If not, why:
If not, why:
Reviewer Checklist
All reviewers please ensure the following are true before reviewing:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.