From ccb3848ee6ad7cc105cc131eae7250df3a8357d0 Mon Sep 17 00:00:00 2001 From: Shane32 Date: Fri, 24 May 2024 23:07:22 -0400 Subject: [PATCH] Add trimmable tests --- .github/workflows/wf-build-test.yml | 6 ++++- QRCoder.sln | 22 +++++++++++++++++-- QRCoder/QRCoder.csproj | 1 + QRCoderTrimAnalysis/Program.cs | 2 ++ .../QRCoderTrimAnalysis.csproj | 21 ++++++++++++++++++ 5 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 QRCoderTrimAnalysis/Program.cs create mode 100644 QRCoderTrimAnalysis/QRCoderTrimAnalysis.csproj diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index 18ca287f..eca43ce8 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -86,7 +86,11 @@ jobs: - name: Run test .NET 6.0 Windows working-directory: QRCoderTests run: dotnet test -c Release -f net6.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - + + - name: Run trim analysis + working-directory: QRCoderTrimAnalysis + run: dotnet publish -c Release -o bin/publish + - name: Run API approval tests working-directory: QRCoderApiTests run: dotnet test -c Release --nologo --no-build diff --git a/QRCoder.sln b/QRCoder.sln index 7723fafb..3d38636f 100644 --- a/QRCoder.sln +++ b/QRCoder.sln @@ -15,9 +15,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QRCoderTests", "QRCoderTest EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QRCoder.Xaml", "QRCoder.Xaml\QRCoder.Xaml.csproj", "{A7A7E073-2504-4BA2-A63B-87AC34174789}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRCoderApiTests", "QRCoderApiTests\QRCoderApiTests.csproj", "{5FACE5F6-53C9-4B89-91D4-162677893574}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QRCoderApiTests", "QRCoderApiTests\QRCoderApiTests.csproj", "{5FACE5F6-53C9-4B89-91D4-162677893574}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRCoderBenchmarks", "QRCoderBenchmarks\QRCoderBenchmarks.csproj", "{C33AB74A-2AB3-4BEA-A67F-EAB578E74E25}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QRCoderBenchmarks", "QRCoderBenchmarks\QRCoderBenchmarks.csproj", "{C33AB74A-2AB3-4BEA-A67F-EAB578E74E25}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRCoderTrimAnalysis", "QRCoderTrimAnalysis\QRCoderTrimAnalysis.csproj", "{F046136A-7BEA-49F3-9415-70CE50AD533B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -155,6 +157,22 @@ Global {C33AB74A-2AB3-4BEA-A67F-EAB578E74E25}.Release|x64.Build.0 = Release|Any CPU {C33AB74A-2AB3-4BEA-A67F-EAB578E74E25}.Release|x86.ActiveCfg = Release|Any CPU {C33AB74A-2AB3-4BEA-A67F-EAB578E74E25}.Release|x86.Build.0 = Release|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Debug|ARM.ActiveCfg = Debug|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Debug|ARM.Build.0 = Debug|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Debug|x64.ActiveCfg = Debug|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Debug|x64.Build.0 = Debug|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Debug|x86.ActiveCfg = Debug|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Debug|x86.Build.0 = Debug|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Release|Any CPU.Build.0 = Release|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Release|ARM.ActiveCfg = Release|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Release|ARM.Build.0 = Release|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Release|x64.ActiveCfg = Release|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Release|x64.Build.0 = Release|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Release|x86.ActiveCfg = Release|Any CPU + {F046136A-7BEA-49F3-9415-70CE50AD533B}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/QRCoder/QRCoder.csproj b/QRCoder/QRCoder.csproj index c9a30473..cb1bb0a9 100644 --- a/QRCoder/QRCoder.csproj +++ b/QRCoder/QRCoder.csproj @@ -8,6 +8,7 @@ $(DefineConstants);NET6_0_WINDOWS false true + true diff --git a/QRCoderTrimAnalysis/Program.cs b/QRCoderTrimAnalysis/Program.cs new file mode 100644 index 00000000..3751555c --- /dev/null +++ b/QRCoderTrimAnalysis/Program.cs @@ -0,0 +1,2 @@ +// See https://aka.ms/new-console-template for more information +Console.WriteLine("Hello, World!"); diff --git a/QRCoderTrimAnalysis/QRCoderTrimAnalysis.csproj b/QRCoderTrimAnalysis/QRCoderTrimAnalysis.csproj new file mode 100644 index 00000000..3f4eedf8 --- /dev/null +++ b/QRCoderTrimAnalysis/QRCoderTrimAnalysis.csproj @@ -0,0 +1,21 @@ + + + + + + + Exe + net8.0 + enable + enable + true + true + false + + + + + + + +