Skip to content
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

Add API approvals to tests #504

Merged
merged 22 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Updates to test workflow
  • Loading branch information
Shane32 committed Apr 27, 2024
commit c63df189c3d5803e16a78698b3653ffb0bfb4a1b
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
Loading