Skip to content

Commit

Permalink
Updates to test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane32 committed Apr 27, 2024
1 parent d0354be commit c63df18
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/wf-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,13 @@ jobs:
1.0.x
2.0.x
5.0.x
6.0.x
- name: Setup MSBuild Path
uses: microsoft/setup-msbuild@v1

- name: Setup NuGet
uses: NuGet/setup-nuget@v2

6.0.x
- name: Restore NuGet Packages
run: nuget restore QRCoder.sln
run: dotnet restore

- name: Build library
run: msbuild QRCoder.sln /p:Configuration=Release /p:NoWarn="1182" /p:NoWarn="1701" /nr:false /t:Rebuild
run: dotnet build -c Release --no-restore

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion QRCoderApiTests/QRCoderApiTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions QRCoderApiTests/net60-windows/QRCoder.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ namespace QRCoder
public string GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, System.Drawing.Bitmap icon, int iconSizePercent = 15, int iconBorderWidth = 6, bool drawQuietZones = true, QRCoder.Base64QRCode.ImageType imgType = 2) { }
public enum ImageType
{
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
Gif = 0,
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
Jpeg = 1,
Png = 2,
}
Expand Down
2 changes: 2 additions & 0 deletions QRCoderApiTests/net60/QRCoder.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ namespace QRCoder
public string GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, bool drawQuietZones = true, QRCoder.Base64QRCode.ImageType imgType = 2) { }
public enum ImageType
{
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
Gif = 0,
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
Jpeg = 1,
Png = 2,
}
Expand Down
1 change: 1 addition & 0 deletions QRCoderTests/QRCoderTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<IsTestProject>true</IsTestProject>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<NoWarn>$(NoWarn);NU1903</NoWarn>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' or '$(TargetFramework)' == 'net5.0-windows' or '$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net6.0-windows' ">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
Expand Down

0 comments on commit c63df18

Please sign in to comment.