From 7942e2dee05f31f0c5f9984c26ea3fd3ce88db7b Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Thu, 12 Jun 2025 22:12:29 -0400 Subject: [PATCH 1/5] test --- .github/workflows/wf-build-test.yml | 86 +++++++++++++---------------- 1 file changed, 38 insertions(+), 48 deletions(-) diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index eca43ce8..67935875 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -7,8 +7,6 @@ on: jobs: build: runs-on: windows-2019 - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: true steps: - uses: actions/checkout@v4 name: Checkout Code @@ -16,12 +14,7 @@ jobs: - name: Install additional .NET SDKs uses: actions/setup-dotnet@v4 with: - dotnet-version: | - 1.0.x - 2.0.x - 5.0.x - 6.0.x - 8.0.x + dotnet-version: 8.0.x - name: Restore NuGet Packages run: dotnet restore @@ -33,59 +26,56 @@ jobs: uses: actions/upload-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: . test: - needs: build + needs: build runs-on: windows-2019 - steps: + strategy: + matrix: + dotnet-framework: + - { name: ".NET 3.5", framework: "net35", coverage: false, no-build: true, sdk: "8.0.x" } + - { name: ".NET 4.52", framework: "net452", coverage: false, no-build: true, sdk: "8.0.x" } + - { name: ".NET Core 1.1", framework: "netcoreapp1.1", coverage: false, no-build: false, sdk: "1.0.x" } + - { name: ".NET Core 2.0", framework: "netcoreapp2.0", coverage: true, no-build: false, sdk: "2.0.x" } + - { name: ".NET 5.0", framework: "net5.0", coverage: true, no-build: true, sdk: "5.0.x" } + - { name: ".NET 5.0 Windows", framework: "net5.0-windows", coverage: true, no-build: true, sdk: "5.0.x" } + - { name: ".NET 6.0", framework: "net6.0", coverage: true, no-build: true, sdk: "6.0.x" } + - { name: ".NET 6.0 Windows", framework: "net6.0-windows", coverage: true, no-build: true, sdk: "6.0.x" } + name: Test ${{ matrix.dotnet-framework.name }} + steps: - name: Download artifacts uses: actions/download-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: D:\a\qrcoder\qrcoder - - name: Install additional .NET SDKs + - name: Install .NET SDK ${{ matrix.dotnet-framework.sdk }} uses: actions/setup-dotnet@v4 with: - dotnet-version: | - 1.0.x - 2.0.x - 5.0.x - 6.0.x - 8.0.x - - - name: Run test .NET 3.5 - working-directory: QRCoderTests - run: dotnet test -c Release -f net35 --nologo --no-build # No coverage for NET3.5 because of bug in combination with Coverlet+Stronh naming - - - name: Run test .NET 4.52 - working-directory: QRCoderTests - run: dotnet test -c Release -f net452 --nologo --no-build # No coverage for NET4.5 because of bug in combination with Coverlet+Strong naming - - - name: Run test .NET Core 1.1 - working-directory: QRCoderTests - run: dotnet test -c Release -f netcoreapp1.1 --nologo # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 - - - name: Run test .NET Core 2.0 - working-directory: QRCoderTests - run: dotnet test -c Release -f netcoreapp2.0 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - - - name: Run test .NET 5.0 - working-directory: QRCoderTests - run: dotnet test -c Release -f net5.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + dotnet-version: ${{ matrix.dotnet-framework.sdk }} - - name: Run test .NET 5.0 Windows + - name: Run tests for ${{ matrix.dotnet-framework.name }} working-directory: QRCoderTests - run: dotnet test -c Release -f net5.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + run: | + $coverage = if ("${{ matrix.dotnet-framework.coverage }}" -eq "true") { "/p:CollectCoverage=true /p:CoverletOutputFormat=opencover" } else { "" } + $noBuild = if ("${{ matrix.dotnet-framework.no-build }}" -eq "true") { "--no-build" } else { "" } + dotnet test -c Release -f ${{ matrix.dotnet-framework.framework }} --nologo $noBuild $coverage - - name: Run test .NET 6.0 - working-directory: QRCoderTests - run: dotnet test -c Release -f net6.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + additional-tests: + needs: build + runs-on: windows-2019 + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: Compiled project + path: D:\a\qrcoder\qrcoder - - name: Run test .NET 6.0 Windows - working-directory: QRCoderTests - run: dotnet test -c Release -f net6.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + - name: Install additional .NET SDKs + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x - name: Run trim analysis working-directory: QRCoderTrimAnalysis @@ -96,7 +86,7 @@ jobs: run: dotnet test -c Release --nologo --no-build clean: - needs: [build, test] + needs: [build, test, additional-tests] if: always() runs-on: windows-2019 steps: From 296dad2190acd7fcc7da7e101f405c32dc7cfd4b Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Thu, 12 Jun 2025 22:18:42 -0400 Subject: [PATCH 2/5] update --- .github/workflows/wf-build-release-ci.yml | 6 +++--- .github/workflows/wf-build-release.yml | 6 +++--- .github/workflows/wf-build-test.yml | 6 +++--- .github/workflows/wf-verify-formatting.yml | 6 +----- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/wf-build-release-ci.yml b/.github/workflows/wf-build-release-ci.yml index 124e9b18..3b3b2987 100644 --- a/.github/workflows/wf-build-release-ci.yml +++ b/.github/workflows/wf-build-release-ci.yml @@ -33,7 +33,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: C:\a\qrcoder\qrcoder test: needs: build @@ -43,7 +43,7 @@ jobs: uses: actions/download-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: C:\a\qrcoder\qrcoder - name: Install additional .NET SDKs uses: actions/setup-dotnet@v4 @@ -147,7 +147,7 @@ jobs: uses: actions/download-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: C:\a\qrcoder\qrcoder - name: Install additional .NET SDKs uses: actions/setup-dotnet@v4 diff --git a/.github/workflows/wf-build-release.yml b/.github/workflows/wf-build-release.yml index 1b898d11..4f5cd2f4 100644 --- a/.github/workflows/wf-build-release.yml +++ b/.github/workflows/wf-build-release.yml @@ -34,7 +34,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: C:\a\qrcoder\qrcoder test: needs: build @@ -44,7 +44,7 @@ jobs: uses: actions/download-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: C:\a\qrcoder\qrcoder - name: Install additional .NET SDKs uses: actions/setup-dotnet@v4 @@ -147,7 +147,7 @@ jobs: uses: actions/download-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: C:\a\qrcoder\qrcoder - name: Install additional .NET SDKs uses: actions/setup-dotnet@v4 diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index 67935875..9e13e4c6 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -26,7 +26,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: Compiled project - path: . + path: C:\a\qrcoder\qrcoder test: needs: build @@ -48,7 +48,7 @@ jobs: uses: actions/download-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: C:\a\qrcoder\qrcoder - name: Install .NET SDK ${{ matrix.dotnet-framework.sdk }} uses: actions/setup-dotnet@v4 @@ -70,7 +70,7 @@ jobs: uses: actions/download-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: C:\a\qrcoder\qrcoder - name: Install additional .NET SDKs uses: actions/setup-dotnet@v4 diff --git a/.github/workflows/wf-verify-formatting.yml b/.github/workflows/wf-verify-formatting.yml index acc21c54..8067bdbf 100644 --- a/.github/workflows/wf-verify-formatting.yml +++ b/.github/workflows/wf-verify-formatting.yml @@ -15,11 +15,7 @@ jobs: - name: Install additional .NET SDKs uses: actions/setup-dotnet@v4 with: - dotnet-version: | - 2.0.x - 5.0.x - 6.0.x - 8.0.x + dotnet-version: 8.0.x - name: Restore NuGet Packages run: dotnet restore From 9f77082deab67cbed98d694242dfb19e4733d04b Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Thu, 12 Jun 2025 22:56:01 -0400 Subject: [PATCH 3/5] update --- .github/workflows/wf-verify-formatting.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wf-verify-formatting.yml b/.github/workflows/wf-verify-formatting.yml index 8067bdbf..3dbb788e 100644 --- a/.github/workflows/wf-verify-formatting.yml +++ b/.github/workflows/wf-verify-formatting.yml @@ -7,7 +7,9 @@ on: jobs: format: - runs-on: windows-2019 + runs-on: ubuntu-latest + env: + EnableWindowsTargeting: true steps: - uses: actions/checkout@v4 name: Checkout Code From 179e36f277db34ceb86d95e86d2fbea2c1e9ad84 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Tue, 30 Sep 2025 19:09:41 -0400 Subject: [PATCH 4/5] Update runner to use windows-latest for additional tests --- .github/workflows/wf-build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index 5d1f186a..383b23f3 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -66,7 +66,7 @@ jobs: additional-tests: needs: build - runs-on: windows-2019 + runs-on: windows-latest steps: - name: Download artifacts uses: actions/download-artifact@v4 From 812d50ed2f6b9e80aa127f8ebece2b0dbbd0cf9e Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Tue, 30 Sep 2025 19:17:15 -0400 Subject: [PATCH 5/5] Bump QRCoderApiTests to .NET 8 --- QRCoderApiTests/QRCoderApiTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QRCoderApiTests/QRCoderApiTests.csproj b/QRCoderApiTests/QRCoderApiTests.csproj index 23daa646..f6dabcb8 100644 --- a/QRCoderApiTests/QRCoderApiTests.csproj +++ b/QRCoderApiTests/QRCoderApiTests.csproj @@ -1,7 +1,7 @@ - net6.0-windows + net8.0-windows enable true