From c4c7fba006728c71bad9737853216267e15a172e Mon Sep 17 00:00:00 2001 From: Simon Marty Date: Thu, 2 Apr 2026 13:12:26 -0700 Subject: [PATCH 1/2] Matrix dotnet build --- .github/workflows/dotnet.yml | 25 ++++++++++++------- ...nager.Extensions.Caching.IntegTests.csproj | 2 +- ...anager.Extensions.Caching.UnitTests.csproj | 2 +- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index f850451..fd56d4b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -12,20 +12,27 @@ permissions: jobs: build: - runs-on: windows-latest + name: build (${{ matrix.runner}}, .NET ${{ matrix.dotnet-version }}) + strategy: + fail-fast: false + matrix: + # Run on supported LTS versions + runner: [ubuntu-latest, windows-latest] + dotnet-version: [10, 8] + runs-on: ${{ matrix.runner }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: - dotnet-version: | - 8 + dotnet-version: ${{ matrix.dotnet-version }} - name: Install .NET Framework (add MSBuild to Path) - uses: microsoft/setup-msbuild@v2 + if: runner.os == 'Windows' + uses: microsoft/setup-msbuild@v3 with: - msbuild-architecture: x64 + msbuild-architecture: ${{ runner.arch }} - name: Restore dependencies run: dotnet restore - name: Build @@ -33,9 +40,9 @@ jobs: - name: Test # 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 - name: Codecov - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: directory: test/Amazon.SecretsManager.Extensions.Caching.UnitTests/TestResults fail_ci_if_error: true diff --git a/test/Amazon.SecretsManager.Extensions.Caching.IntegTests/Amazon.SecretsManager.Extensions.Caching.IntegTests.csproj b/test/Amazon.SecretsManager.Extensions.Caching.IntegTests/Amazon.SecretsManager.Extensions.Caching.IntegTests.csproj index ab87dad..cab89a6 100644 --- a/test/Amazon.SecretsManager.Extensions.Caching.IntegTests/Amazon.SecretsManager.Extensions.Caching.IntegTests.csproj +++ b/test/Amazon.SecretsManager.Extensions.Caching.IntegTests/Amazon.SecretsManager.Extensions.Caching.IntegTests.csproj @@ -1,7 +1,7 @@ - net8.0;net48 + net8.0;net10.0;net48 false true true diff --git a/test/Amazon.SecretsManager.Extensions.Caching.UnitTests/Amazon.SecretsManager.Extensions.Caching.UnitTests.csproj b/test/Amazon.SecretsManager.Extensions.Caching.UnitTests/Amazon.SecretsManager.Extensions.Caching.UnitTests.csproj index 6caa13d..6bead69 100644 --- a/test/Amazon.SecretsManager.Extensions.Caching.UnitTests/Amazon.SecretsManager.Extensions.Caching.UnitTests.csproj +++ b/test/Amazon.SecretsManager.Extensions.Caching.UnitTests/Amazon.SecretsManager.Extensions.Caching.UnitTests.csproj @@ -1,7 +1,7 @@  - net8.0;net48 + net8.0;net10.0;net48 false true true From 5dbd8bbd2181ae692b1518783387b5bb97973d67 Mon Sep 17 00:00:00 2001 From: Simon Marty Date: Thu, 9 Jul 2026 12:29:15 -0700 Subject: [PATCH 2/2] Address comments --- .github/workflows/dotnet.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index fd56d4b..e2089dc 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -12,13 +12,21 @@ permissions: jobs: build: - name: build (${{ matrix.runner}}, .NET ${{ matrix.dotnet-version }}) + name: build (${{ matrix.runner }}, ${{ matrix.framework }}) strategy: fail-fast: false matrix: - # Run on supported LTS versions - runner: [ubuntu-latest, windows-latest] - dotnet-version: [10, 8] + include: + - runner: ubuntu-latest + framework: net8.0 + - runner: ubuntu-latest + framework: net10.0 + - runner: windows-latest + framework: net8.0 + - runner: windows-latest + framework: net10.0 + - runner: windows-latest + framework: net48 runs-on: ${{ matrix.runner }} steps: @@ -27,12 +35,14 @@ jobs: - name: Install .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: ${{ matrix.dotnet-version }} + dotnet-version: | + 8 + 10 - name: Install .NET Framework (add MSBuild to Path) if: runner.os == 'Windows' uses: microsoft/setup-msbuild@v3 with: - msbuild-architecture: ${{ runner.arch }} + msbuild-architecture: x64 - name: Restore dependencies run: dotnet restore - name: Build @@ -40,7 +50,7 @@ jobs: - name: Test # 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 ${{ runner.os != 'Windows' && format('--framework net{0}.0', matrix.dotnet-version) || '' }} -- RunConfiguration.DisableAppDomain=true + run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" test/Amazon.SecretsManager.Extensions.Caching.UnitTests --framework ${{ matrix.framework }} -- RunConfiguration.DisableAppDomain=true - name: Codecov uses: codecov/codecov-action@v6 with: