From bbc8b573397820faf4402f197190ca2a499a18ce Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Tue, 17 Jun 2025 11:58:32 -0400 Subject: [PATCH 1/5] Fix CI --- .github/workflows/wf-build-release-ci.yml | 6 +++--- .github/workflows/wf-build-release.yml | 6 +++--- .github/workflows/wf-build-test.yml | 4 ++-- .github/workflows/wf-verify-formatting.yml | 10 ++++------ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/wf-build-release-ci.yml b/.github/workflows/wf-build-release-ci.yml index 124e9b18..552f2e78 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: ${{ github.workspace }} test: needs: build @@ -43,7 +43,7 @@ jobs: uses: actions/download-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: ${{ github.workspace }} - 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: ${{ github.workspace }} - 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..1879212f 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: ${{ github.workspace }} test: needs: build @@ -44,7 +44,7 @@ jobs: uses: actions/download-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: ${{ github.workspace }} - 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: ${{ github.workspace }} - 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 eca43ce8..5597ba90 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -33,7 +33,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: ${{ github.workspace }} test: needs: build @@ -43,7 +43,7 @@ jobs: uses: actions/download-artifact@v4 with: name: Compiled project - path: D:\a\qrcoder\qrcoder + path: ${{ github.workspace }} - 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..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 @@ -15,11 +17,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 b586d66324589cc475fed8a9812ccee1023c4773 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Tue, 17 Jun 2025 12:01:16 -0400 Subject: [PATCH 2/5] update --- .github/workflows/wf-build-release-ci.yml | 8 ++++---- .github/workflows/wf-build-release.yml | 8 ++++---- .github/workflows/wf-build-test.yml | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/wf-build-release-ci.yml b/.github/workflows/wf-build-release-ci.yml index 552f2e78..8bf0c577 100644 --- a/.github/workflows/wf-build-release-ci.yml +++ b/.github/workflows/wf-build-release-ci.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: build: - runs-on: windows-2019 + runs-on: windows-latest env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true steps: @@ -37,7 +37,7 @@ jobs: test: needs: build - runs-on: windows-2019 + runs-on: windows-latest steps: - name: Download artifacts uses: actions/download-artifact@v4 @@ -139,7 +139,7 @@ jobs: pack-push-ci: needs: test - runs-on: windows-2019 + runs-on: windows-latest env: GH_PKG_SEC: ${{ secrets.GITHUB_TOKEN }} steps: @@ -193,7 +193,7 @@ jobs: clean: needs: [build, test, pack-push-ci] if: always() - runs-on: windows-2019 + runs-on: windows-latest steps: - name: Delete artifacts uses: GeekyEggo/delete-artifact@v5 diff --git a/.github/workflows/wf-build-release.yml b/.github/workflows/wf-build-release.yml index 1879212f..ad7a5f21 100644 --- a/.github/workflows/wf-build-release.yml +++ b/.github/workflows/wf-build-release.yml @@ -7,7 +7,7 @@ on: required: true jobs: build: - runs-on: windows-2019 + runs-on: windows-latest env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true steps: @@ -38,7 +38,7 @@ jobs: test: needs: build - runs-on: windows-2019 + runs-on: windows-latest steps: - name: Download artifacts uses: actions/download-artifact@v4 @@ -139,7 +139,7 @@ jobs: pack-push-release: needs: test - runs-on: windows-2019 + runs-on: windows-latest env: GH_PKG_SEC: ${{ secrets.GITHUB_TOKEN }} steps: @@ -187,7 +187,7 @@ jobs: clean: needs: [build, test, pack-push-release] if: always() - runs-on: windows-2019 + runs-on: windows-latest steps: - name: Delete artifacts uses: GeekyEggo/delete-artifact@v5 diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index 5597ba90..64cc56d3 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: build: - runs-on: windows-2019 + runs-on: windows-latest env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true steps: @@ -37,7 +37,7 @@ jobs: test: needs: build - runs-on: windows-2019 + runs-on: windows-latest steps: - name: Download artifacts uses: actions/download-artifact@v4 @@ -98,7 +98,7 @@ jobs: clean: needs: [build, test] if: always() - runs-on: windows-2019 + runs-on: windows-latest steps: - name: Delete artifacts uses: GeekyEggo/delete-artifact@v5 From 271c243bcc6c9d78fc6914f6babcc4a9109ddae8 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Tue, 30 Sep 2025 07:59:59 -0400 Subject: [PATCH 3/5] update --- .github/workflows/wf-build-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index 64cc56d3..17ac47af 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: build: - runs-on: windows-latest + runs-on: windows-2022 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true steps: @@ -37,7 +37,7 @@ jobs: test: needs: build - runs-on: windows-latest + runs-on: windows-2022 steps: - name: Download artifacts uses: actions/download-artifact@v4 @@ -98,7 +98,7 @@ jobs: clean: needs: [build, test] if: always() - runs-on: windows-latest + runs-on: windows-2022 steps: - name: Delete artifacts uses: GeekyEggo/delete-artifact@v5 From d0b2b28a676e00670ea12cd86adf7d5d953ddaea Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Tue, 30 Sep 2025 08:02:18 -0400 Subject: [PATCH 4/5] Revert "update" This reverts commit 271c243bcc6c9d78fc6914f6babcc4a9109ddae8. --- .github/workflows/wf-build-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index 17ac47af..64cc56d3 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: build: - runs-on: windows-2022 + runs-on: windows-latest env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true steps: @@ -37,7 +37,7 @@ jobs: test: needs: build - runs-on: windows-2022 + runs-on: windows-latest steps: - name: Download artifacts uses: actions/download-artifact@v4 @@ -98,7 +98,7 @@ jobs: clean: needs: [build, test] if: always() - runs-on: windows-2022 + runs-on: windows-latest steps: - name: Delete artifacts uses: GeekyEggo/delete-artifact@v5 From eec8e73aacf1c4c40f6237a745b440e7e2f12fc5 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Tue, 30 Sep 2025 08:05:41 -0400 Subject: [PATCH 5/5] Update --- QRCoder/PayloadGenerator/BezahlCode.cs | 4 ++-- QRCoderTests/PayloadGeneratorTests/BezahlCodeTests.cs | 4 ++-- QRCoderTests/SvgQRCodeRendererTests.cs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/QRCoder/PayloadGenerator/BezahlCode.cs b/QRCoder/PayloadGenerator/BezahlCode.cs index fe4f1f73..df9f17f6 100644 --- a/QRCoder/PayloadGenerator/BezahlCode.cs +++ b/QRCoder/PayloadGenerator/BezahlCode.cs @@ -143,7 +143,7 @@ public BezahlCode(AuthorityType authority, string name, string account, string b } _authority = authority; - + var oldWayFilled = (!string.IsNullOrEmpty(account) && !string.IsNullOrEmpty(bnc)); var newWayFilled = (!string.IsNullOrEmpty(iban) && !string.IsNullOrEmpty(bic)); @@ -163,7 +163,7 @@ public BezahlCode(AuthorityType authority, string name, string account, string b if (authority == AuthorityType.periodicsinglepayment || authority == AuthorityType.singledirectdebit || authority == AuthorityType.singlepayment || authority == AuthorityType.contact || (authority == AuthorityType.contact_v2 && oldWayFilled)) { #pragma warning restore CS0612 - + if (!Regex.IsMatch(account.Replace(" ", ""), @"^[0-9]{1,9}$")) throw new BezahlCodeException("The account entered isn't valid."); _account = account.Replace(" ", "").ToUpper(); diff --git a/QRCoderTests/PayloadGeneratorTests/BezahlCodeTests.cs b/QRCoderTests/PayloadGeneratorTests/BezahlCodeTests.cs index 8a2bec9b..7d181565 100644 --- a/QRCoderTests/PayloadGeneratorTests/BezahlCodeTests.cs +++ b/QRCoderTests/PayloadGeneratorTests/BezahlCodeTests.cs @@ -453,14 +453,14 @@ public void bezahlcode_generator_should_throw_reason_too_long_exception() var iban = "DE33 100205000 0011947 00"; var bic = "BFSWDE33BER"; var name = "Wikimedia Fördergesellschaft"; - var reason = "A long long long reason text which may resolve in an exception"; + var reason = "A long long long reason text which may resolve in an exception" + new string('.', 200); var amount = 10.00m; var exception = Record.Exception(() => new PayloadGenerator.BezahlCode(AuthorityType.singlepaymentsepa, name, iban: iban, bic: bic, amount: amount, reason: reason)); Assert.NotNull(exception); Assert.IsType(exception); - exception.Message.ShouldBe("Reasons texts have to be shorter than 28 chars."); + exception.Message.ShouldBe("Reasons texts have to be shorter than 141 chars."); } diff --git a/QRCoderTests/SvgQRCodeRendererTests.cs b/QRCoderTests/SvgQRCodeRendererTests.cs index a7f8b3db..54ff9fc1 100644 --- a/QRCoderTests/SvgQRCodeRendererTests.cs +++ b/QRCoderTests/SvgQRCodeRendererTests.cs @@ -99,7 +99,7 @@ public void can_render_svg_qrcode_with_png_logo_bitmap() var svg = new SvgQRCode(data).GetGraphic(10, Color.DarkGray, Color.White, logo: logoObj); var result = HelperFunctions.StringToHash(svg); - result.ShouldBe("78e02e8ba415f15817d5ed88c4afca31"); + result.ShouldBe("04b12051632549cbb1879a0fe1353731"); } [Fact] @@ -117,7 +117,7 @@ public void can_render_svg_qrcode_with_png_logo_bitmap_without_background() var svg = new SvgQRCode(data).GetGraphic(10, Color.DarkGray, Color.White, logo: logoObj); var result = HelperFunctions.StringToHash(svg); - result.ShouldBe("f221b2baecc2883f8e8ae54f12ba701b"); + result.ShouldBe("b40c6997f78a2ef31e0a298c68bd31df"); } [Fact] @@ -135,7 +135,7 @@ public void can_render_svg_qrcode_with_png_logo_bitmap_without_quietzones() var svg = new SvgQRCode(data).GetGraphic(10, Color.Black, Color.White, drawQuietZones: false, logo: logoObj); var result = HelperFunctions.StringToHash(svg); - result.ShouldBe("8b4d114136c7fd26e0b34e5a15daac3b"); + result.ShouldBe("42c43d33fc41bfff07b12f43b367808c"); } #endif