File tree Expand file tree Collapse file tree
Microsoft.OpenApi.Hidi.Tests
Microsoft.OpenApi.Readers.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,20 +105,12 @@ extends:
105105 --configuration $(BuildConfiguration) `
106106 --no-build `
107107 -- `
108- --report-xunit-trx `
109- --results-directory "$(Agent.TempDirectory)\TestResults" `
108+ --report-azdo `
109+ --publish-azdo-test-results `
110+ --results-directory="$(Agent.TempDirectory)\TestResults" `
110111 --minimum-expected-tests 1
111112 displayName: 'test'
112113
113- - task : PublishTestResults@2
114- displayName : ' Publish test results'
115- condition : succeededOrFailed()
116- inputs :
117- testResultsFormat : VSTest
118- testResultsFiles : ' $(Agent.TempDirectory)\TestResults\*.trx'
119- failTaskOnMissingResultsFile : true
120- failTaskOnFailedTests : true
121-
122114 - task : EsrpCodeSigning@6
123115 displayName : ' ESRP CodeSigning binaries'
124116 inputs :
Original file line number Diff line number Diff line change @@ -20,9 +20,12 @@ updates:
2020 MicrosoftExtensions :
2121 patterns :
2222 - Microsoft.Extensions.*
23- coverlet :
23+ testing :
2424 patterns :
2525 - coverlet.*
26+ - Microsoft.NET.Test.Sdk
27+ - Microsoft.Testing.*
28+ - xunit.*
2629 cooldown :
2730 default-days : 7
2831- package-ecosystem : dotnet-sdk
Original file line number Diff line number Diff line change 4545 id : run_unit_tests
4646 shell : pwsh
4747 run : |
48- dotnet test --solution Microsoft.OpenApi.slnx -c Release -v n --coverlet --coverlet-output-format cobertura
48+ dotnet test --solution Microsoft.OpenApi.slnx -c Release -v n --results-directory=./TestResults -- coverlet --coverlet-output-format cobertura --report-gh
4949
5050 - name : Install report generator
5151 shell : pwsh
5555 - name : Generate coverage report
5656 shell : pwsh
5757 run : |
58- reportgenerator -reports:**/coverage.cobertura*.xml -targetdir:./reports/coverage -reporttypes:"Html;MarkdownSummaryGithub;Cobertura"
58+ reportgenerator -reports:./TestResults/ **/coverage.cobertura. *.xml -targetdir:./reports/coverage -reporttypes:"Html;MarkdownSummaryGithub;Cobertura"
5959
6060 - name : Add coverage to job summary
6161 shell : bash
Original file line number Diff line number Diff line change 6666 dotnet tool run dotnet-sonarscanner begin /k:"microsoft_OpenAPI.NET" /o:"microsoft" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="**/coverage.opencover*.xml"
6767 dotnet workload restore
6868 dotnet build
69- dotnet test --solution Microsoft.OpenApi.slnx --verbosity normal --coverlet --coverlet-output-format opencover
69+ dotnet test --solution Microsoft.OpenApi.slnx --verbosity normal --coverlet --coverlet-output-format opencover --report-gh
7070 dotnet tool run dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
Original file line number Diff line number Diff line change 1616 <ItemGroup >
1717 <PackageReference Include =" coverlet.MTP" Version =" 10.0.1" PrivateAssets =" all" />
1818 <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 18.9.0" />
19+ <PackageReference Include =" Microsoft.Testing.Extensions.AzureDevOpsReport" Version =" 2.4.0" />
20+ <PackageReference Include =" Microsoft.Testing.Extensions.GitHubActionsReport" Version =" 2.4.0" />
1921 <PackageReference Include =" Moq" Version =" 4.20.72" />
2022 <PackageReference Include =" xunit.v3" Version =" 4.0.0" />
2123 </ItemGroup >
Original file line number Diff line number Diff line change 1818 <ItemGroup >
1919 <PackageReference Include =" coverlet.MTP" Version =" 10.0.1" PrivateAssets =" all" />
2020 <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 18.9.0" />
21+ <PackageReference Include =" Microsoft.Testing.Extensions.AzureDevOpsReport" Version =" 2.4.0" />
22+ <PackageReference Include =" Microsoft.Testing.Extensions.GitHubActionsReport" Version =" 2.4.0" />
2123 <PackageReference Include =" xunit.v3" Version =" 4.0.0" />
2224 </ItemGroup >
2325
Original file line number Diff line number Diff line change 1111 <ItemGroup >
1212 <PackageReference Include =" coverlet.MTP" Version =" 10.0.1" PrivateAssets =" all" />
1313 <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 18.9.0" />
14+ <PackageReference Include =" Microsoft.Testing.Extensions.AzureDevOpsReport" Version =" 2.4.0" />
15+ <PackageReference Include =" Microsoft.Testing.Extensions.GitHubActionsReport" Version =" 2.4.0" />
1416 <PackageReference Include =" Moq" Version =" 4.20.72" />
1517 <PackageReference Include =" Verify.XunitV3" Version =" 32.0.0" />
1618 <PackageReference Include =" xunit.v3" Version =" 4.0.0" />
You can’t perform that action at this time.
0 commit comments