Skip to content

Fix workflows #492

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

Merged
merged 3 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/wf-build-release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
name: Checkout Code

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
Copy link
Contributor Author

@Shane32 Shane32 Apr 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI, I've had numerous problems with actions/setup-dotnet on other GitHub workflows that are still using v1; bumping to v4 has fixed those problems for me in the past.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it works, then let's use v4. I just ised v1 because it was the up-to-date version when setting up the workflow.

with:
dotnet-version: |
1.0.x
Expand All @@ -26,7 +26,7 @@ jobs:
uses: microsoft/setup-msbuild@v1

- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.2
uses: NuGet/setup-nuget@v2

- name: Restore NuGet Packages
run: nuget restore QRCoder.sln
Expand All @@ -35,7 +35,7 @@ jobs:
run: msbuild QRCoder.sln /p:Configuration=Release /p:NoWarn="1182" /p:NoWarn="1701" /nr:false /t:Rebuild

- name: Upload artifacts
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
Expand All @@ -45,13 +45,13 @@ jobs:
runs-on: windows-2019
steps:
- name: Download artifacts
uses: actions/download-artifact@v1.0.0
uses: actions/download-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
1.0.x
Expand Down Expand Up @@ -126,13 +126,13 @@ jobs:
GH_PKG_SEC: ${{ secrets.GH_PKG_REPO }}
steps:
- name: Download artifacts
uses: actions/download-artifact@v1.0.0
uses: actions/download-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
1.0.x
Expand Down Expand Up @@ -177,6 +177,6 @@ jobs:
runs-on: windows-2019
steps:
- name: Delete artifacts
uses: GeekyEggo/delete-artifact@v1.0.0
uses: GeekyEggo/delete-artifact@v5
with:
name: Compiled project
16 changes: 8 additions & 8 deletions .github/workflows/wf-build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
name: Checkout Code

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
1.0.x
Expand All @@ -27,7 +27,7 @@ jobs:
uses: microsoft/setup-msbuild@v1

- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.2
uses: NuGet/setup-nuget@v2

- name: Restore NuGet Packages
run: nuget restore QRCoder.sln
Expand All @@ -36,7 +36,7 @@ jobs:
run: msbuild QRCoder.sln /p:Configuration=Release /p:NoWarn="1182" /p:NoWarn="1701" /nr:false /t:Rebuild

- name: Upload artifacts
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
Expand All @@ -46,7 +46,7 @@ jobs:
runs-on: windows-2019
steps:
- name: Download artifacts
uses: actions/download-artifact@v1.0.0
uses: actions/download-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
Expand Down Expand Up @@ -126,13 +126,13 @@ jobs:
GH_PKG_SEC: ${{ secrets.GH_PKG_REPO }}
steps:
- name: Download artifacts
uses: actions/download-artifact@v1.0.0
uses: actions/download-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
1.0.x
Expand Down Expand Up @@ -171,6 +171,6 @@ jobs:
runs-on: windows-2019
steps:
- name: Delete artifacts
uses: GeekyEggo/delete-artifact@v1.0.0
uses: GeekyEggo/delete-artifact@v5
with:
name: Compiled project
14 changes: 7 additions & 7 deletions .github/workflows/wf-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
name: Checkout Code

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
1.0.x
Expand All @@ -26,7 +26,7 @@ jobs:
uses: microsoft/setup-msbuild@v1

- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.2
uses: NuGet/setup-nuget@v2

- name: Restore NuGet Packages
run: nuget restore QRCoder.sln
Expand All @@ -35,7 +35,7 @@ jobs:
run: msbuild QRCoder.sln /p:Configuration=Release /p:NoWarn="1182" /p:NoWarn="1701" /nr:false /t:Rebuild

- name: Upload artifacts
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder
Expand All @@ -45,13 +45,13 @@ jobs:
runs-on: windows-2019
steps:
- name: Download artifacts
uses: actions/download-artifact@v1.0.0
uses: actions/download-artifact@v4
with:
name: Compiled project
path: D:\a\qrcoder\qrcoder

- name: Install additional .NET SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
1.0.x
Expand Down Expand Up @@ -89,6 +89,6 @@ jobs:
runs-on: windows-2019
steps:
- name: Delete artifacts
uses: GeekyEggo/delete-artifact@v1.0.0
uses: GeekyEggo/delete-artifact@v5
with:
name: Compiled project
20 changes: 0 additions & 20 deletions QRCoderTests/ArtQRCodeRendererTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ public void can_create_standard_qrcode_graphic()
var bmp = new ArtQRCode(data).GetGraphic(10);

var result = HelperFunctions.BitmapToHash(bmp);
#if NET35_OR_GREATER || NET40_OR_GREATER
result.ShouldBe("11ebdda91b9632d016798cb6de2f5339");
#else
result.ShouldBe("cb38c3156eaf13cdfba699bdafc3a84c");
#endif
}

[Fact]
Expand All @@ -40,11 +36,7 @@ public void can_create_standard_qrcode_graphic_with_custom_finder()
var bmp = new ArtQRCode(data).GetGraphic(10, Color.Black, Color.White, Color.Transparent, finderPatternImage: finder);

var result = HelperFunctions.BitmapToHash(bmp);
#if NET35_OR_GREATER || NET40_OR_GREATER
result.ShouldBe("c54a7389ae995abc838f0d228acc3bad");
#else
result.ShouldBe("1102c0c6f235eaf4c3ac639f82f17bfa");
#endif
}

[Fact]
Expand All @@ -56,11 +48,7 @@ public void can_create_standard_qrcode_graphic_without_quietzone()
var bmp = new ArtQRCode(data).GetGraphic(10, Color.Black, Color.White, Color.Transparent, drawQuietZones: false);

var result = HelperFunctions.BitmapToHash(bmp);
#if NET35_OR_GREATER || NET40_OR_GREATER
result.ShouldBe("550f31b988ff12d5f8429ef19d9d5a0c");
#else
result.ShouldBe("632315c8695416fc82fe06a202688433");
#endif
}

[Fact]
Expand All @@ -74,11 +62,7 @@ public void can_create_standard_qrcode_graphic_with_background()

var result = HelperFunctions.BitmapToHash(bmp);

#if NET35_OR_GREATER || NET40_OR_GREATER
result.ShouldBe("2caa9c0ee8fcb4a93841debb58cf41bc");
#else
result.ShouldBe("bbea08507282773175cfe7b52f0ddae4");
#endif
}

[Fact]
Expand Down Expand Up @@ -112,11 +96,7 @@ public void can_render_artqrcode_from_helper()
var bmp = ArtQRCodeHelper.GetQRCode("A", 10, Color.Black, Color.White, Color.Transparent, QRCodeGenerator.ECCLevel.L);

var result = HelperFunctions.BitmapToHash(bmp);
#if NET35_OR_GREATER || NET40_OR_GREATER
result.ShouldBe("fea51114bc4ff893542a1c0574c82a07");
#else
result.ShouldBe("57ecaa9bdeadcdcbeac8a19d734907ff");
#endif
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions QRCoderTests/PngByteQRCodeRendererTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,7 @@ public void can_render_pngbyte_qrcode_color_without_quietzones()
var bmp = (Bitmap)Image.FromStream(mStream);
bmp.MakeTransparent(Color.Transparent);
var result = HelperFunctions.BitmapToHash(bmp);
#if NET35_OR_GREATER || NET40_OR_GREATER
result.ShouldBe("75be11d582575617d2490c54b69e844e");
#else
result.ShouldBe("fbbc8255ebf3e4f4a1d21f0dd15f76f8");
#endif
}
#endif
}
Expand Down
24 changes: 0 additions & 24 deletions QRCoderTests/QRCodeRendererTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ public void can_create_qrcode_standard_graphic_without_quietzones()
var bmp = new QRCode(data).GetGraphic(5, Color.Black, Color.White, false);

var result = HelperFunctions.BitmapToHash(bmp);
#if NET35_OR_GREATER || NET40_OR_GREATER
result.ShouldBe("329e1664f57cbe7332d8d4db04c1d480");
#else
result.ShouldBe("d703e54a0ba541c6ea69e3d316e394e7");
#endif
}


Expand All @@ -65,11 +61,7 @@ public void can_create_qrcode_with_transparent_logo_graphic()
var bmp = new QRCode(data).GetGraphic(10, Color.Black, Color.Transparent, icon: (Bitmap)Image.FromFile(HelperFunctions.GetAssemblyPath() + "\\assets\\noun_software engineer_2909346.png"));
//Used logo is licensed under public domain. Ref.: https://thenounproject.com/Iconathon1/collection/redefining-women/?i=2909346
var result = HelperFunctions.BitmapToHash(bmp);
#if NET35_OR_GREATER || NET40_OR_GREATER
result.ShouldBe("ee65d96c3013f6032b561cc768251eef");
#else
result.ShouldBe("150f8fc7dae4487ba2887d2b2bea1c25");
#endif
}

[Fact]
Expand All @@ -83,11 +75,7 @@ public void can_create_qrcode_with_non_transparent_logo_graphic()
//Used logo is licensed under public domain. Ref.: https://thenounproject.com/Iconathon1/collection/redefining-women/?i=2909346

var result = HelperFunctions.BitmapToHash(bmp);
#if NET35_OR_GREATER || NET40_OR_GREATER
result.ShouldBe("1d718f06f904af4a46748f02af2d4eec");
#else
result.ShouldBe("c46a7ec51bf978d7a882059c322ca69d");
#endif
}

[Fact]
Expand All @@ -102,11 +90,7 @@ public void can_create_qrcode_with_logo_and_with_transparent_border()
var bmp = new QRCode(data).GetGraphic(10, Color.Black, Color.Transparent, icon: logo, iconBorderWidth: 6);
//Used logo is licensed under public domain. Ref.: https://thenounproject.com/Iconathon1/collection/redefining-women/?i=2909346
var result = HelperFunctions.BitmapToHash(bmp);
#if NET35_OR_GREATER || NET40_OR_GREATER
result.ShouldBe("ee65d96c3013f6032b561cc768251eef");
#else
result.ShouldBe("150f8fc7dae4487ba2887d2b2bea1c25");
#endif
}

[Fact]
Expand All @@ -121,11 +105,7 @@ public void can_create_qrcode_with_logo_and_with_standard_border()
var bmp = new QRCode(data).GetGraphic(10, Color.Black, Color.White, icon: logo, iconBorderWidth: 6);
//Used logo is licensed under public domain. Ref.: https://thenounproject.com/Iconathon1/collection/redefining-women/?i=2909346
var result = HelperFunctions.BitmapToHash(bmp);
#if NET35_OR_GREATER || NET40_OR_GREATER
result.ShouldBe("52207bd86ca5a532fb2095dbaa0ae04c");
#else
result.ShouldBe("1c926ea1d48f42fdf8e6f1438b774cdd");
#endif
}

[Fact]
Expand All @@ -140,11 +120,7 @@ public void can_create_qrcode_with_logo_and_with_custom_border()
var bmp = new QRCode(data).GetGraphic(10, Color.Black, Color.Transparent, icon: logo, iconBorderWidth: 6, iconBackgroundColor: Color.DarkGreen);
//Used logo is licensed under public domain. Ref.: https://thenounproject.com/Iconathon1/collection/redefining-women/?i=2909346
var result = HelperFunctions.BitmapToHash(bmp);
#if NET35_OR_GREATER || NET40_OR_GREATER
result.ShouldBe("d2f20d34a973d92b9c3e05db1393b331");
#else
result.ShouldBe("9a06bfbb72df999b6290b5af5c4037cb");
#endif
}


Expand Down