File tree Expand file tree Collapse file tree 5 files changed +29
-18
lines changed
Microsoft.Security.Application.Encoder.UnitTests
Microsoft.Security.Application.HtmlSanitization.Tests Expand file tree Collapse file tree 5 files changed +29
-18
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "version" : 1 ,
3+ "isRoot" : true ,
4+ "tools" : {
5+ "trx2junit" : {
6+ "version" : " 2.1.0" ,
7+ "commands" : [
8+ " trx2junit"
9+ ],
10+ "rollForward" : false
11+ }
12+ }
13+ }
Original file line number Diff line number Diff line change @@ -26,19 +26,26 @@ jobs:
2626 uses : actions/setup-dotnet@v4
2727 with :
2828 global-json-file : global.json
29+ - name : Restore tools
30+ run : dotnet tool restore
2931 - name : Restore dependencies
3032 run : dotnet restore --locked-mode
3133 - name : Build
3234 run : dotnet build --no-restore
3335 - name : Test
34- run : dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage"
36+ run : dotnet test --no-build --verbosity normal -p:TestingPlatformCommandLineArguments="--report-trx --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml"
37+ - name : Convert test results
38+ if : ${{ !cancelled() }}
39+ run : |
40+ find . -name "*.trx" -exec dotnet tool run trx2junit --output TestResults/JUnit {} +
3541 - name : Upload coverage reports to Codecov
3642 uses : codecov/codecov-action@v5.1.2
3743 with :
3844 token : ${{ secrets.CODECOV_TOKEN }}
39- slug : hangy/AntiXss/hangy/AntiXss
45+ slug : hangy/AntiXss
4046 - name : Upload test results to Codecov
4147 if : ${{ !cancelled() }}
4248 uses : codecov/test-results-action@v1
4349 with :
50+ files : TestResults/JUnit/*.xml
4451 token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change 1- <Project Sdk =" Microsoft.NET .Sdk" >
1+ <Project Sdk =" MSTest .Sdk" >
22 <PropertyGroup >
33 <TargetFramework >net9.0</TargetFramework >
44 <RootNamespace >Microsoft.Security.Application.Tests</RootNamespace >
55 <AssemblyTitle >AntiXSS Unit Tests</AssemblyTitle >
66 <AssemblyDescription >Unit Tests for the AntiXSS Library</AssemblyDescription >
7- <IsTestProject >true</ IsTestProject >
7+ <TestingExtensionsProfile >AllMicrosoft</ TestingExtensionsProfile >
88 </PropertyGroup >
99
1010 <ItemGroup >
1111 <ProjectReference Include =" ..\Microsoft.Security.Application.Encoder\Microsoft.Security.Application.Encoder.csproj" />
1212 </ItemGroup >
13-
14- <ItemGroup >
15- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.13.0" />
16- <PackageReference Include =" MSTest.TestAdapter" Version =" 3.8.2" />
17- <PackageReference Include =" MSTest.TestFramework" Version =" 3.8.2" />
18- </ItemGroup >
1913</Project >
Original file line number Diff line number Diff line change 1- <Project Sdk =" Microsoft.NET .Sdk" >
1+ <Project Sdk =" MSTest .Sdk" >
22 <PropertyGroup >
33 <TargetFramework >net9.0</TargetFramework >
44 <RootNamespace >Microsoft.Security.Application.HtmlSanitization.Tests</RootNamespace >
55 <AssemblyName >Microsoft.Security.Application.HtmlSanitization.Tests</AssemblyName >
6- <IsTestProject >true</ IsTestProject >
6+ <TestingExtensionsProfile >AllMicrosoft</ TestingExtensionsProfile >
77 </PropertyGroup >
88
99 <ItemGroup >
1010 <ProjectReference Include =" ..\Microsoft.Security.Application.HtmlSanitization\Microsoft.Security.Application.HtmlSanitization.csproj" />
1111 </ItemGroup >
12-
13- <ItemGroup >
14- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.13.0" />
15- <PackageReference Include =" MSTest.TestAdapter" Version =" 3.8.2" />
16- <PackageReference Include =" MSTest.TestFramework" Version =" 3.8.2" />
17- </ItemGroup >
1812</Project >
Original file line number Diff line number Diff line change 22 "sdk" : {
33 "version" : " 9.0.200" ,
44 "rollForward" : " latestFeature"
5+ },
6+ "msbuild-sdks" : {
7+ "MSTest.Sdk" : " 3.8.2"
58 }
69}
You can’t perform that action at this time.
0 commit comments