Skip to content

Commit c63df18

Browse files
committed
Updates to test workflow
1 parent d0354be commit c63df18

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

.github/workflows/wf-build-test.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,13 @@ jobs:
2020
1.0.x
2121
2.0.x
2222
5.0.x
23-
6.0.x
24-
25-
- name: Setup MSBuild Path
26-
uses: microsoft/setup-msbuild@v1
27-
28-
- name: Setup NuGet
29-
uses: NuGet/setup-nuget@v2
30-
23+
6.0.x
24+
3125
- name: Restore NuGet Packages
32-
run: nuget restore QRCoder.sln
26+
run: dotnet restore
3327

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

3731
- name: Upload artifacts
3832
uses: actions/upload-artifact@v4

QRCoderApiTests/QRCoderApiTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net6.0-windows</TargetFramework>
55
<Nullable>enable</Nullable>
66
<IsTestProject>true</IsTestProject>
77
</PropertyGroup>

QRCoderApiTests/net60-windows/QRCoder.approved.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ namespace QRCoder
7676
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) { }
7777
public enum ImageType
7878
{
79+
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
7980
Gif = 0,
81+
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
8082
Jpeg = 1,
8183
Png = 2,
8284
}

QRCoderApiTests/net60/QRCoder.approved.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ namespace QRCoder
3434
public string GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, bool drawQuietZones = true, QRCoder.Base64QRCode.ImageType imgType = 2) { }
3535
public enum ImageType
3636
{
37+
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
3738
Gif = 0,
39+
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
3840
Jpeg = 1,
3941
Png = 2,
4042
}

QRCoderTests/QRCoderTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<IsTestProject>true</IsTestProject>
1010
<CheckEolTargetFramework>false</CheckEolTargetFramework>
1111
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
12+
<NoWarn>$(NoWarn);NU1903</NoWarn>
1213
</PropertyGroup>
1314
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' or '$(TargetFramework)' == 'net5.0-windows' or '$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net6.0-windows' ">
1415
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />

0 commit comments

Comments
 (0)