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 @@ -100,12 +100,16 @@ extends:
100100 arguments : ' --configuration $(BuildConfiguration) --no-incremental'
101101
102102 # Run the Unit test
103- - task : DotNetCoreCLI@2
103+ - pwsh : |
104+ dotnet test "$(Build.SourcesDirectory)\Microsoft.OpenApi.slnx" `
105+ --configuration $(BuildConfiguration) `
106+ --no-build `
107+ -- `
108+ --report-azdo `
109+ --publish-azdo-test-results `
110+ --results-directory="$(Agent.TempDirectory)\TestResults" `
111+ --minimum-expected-tests 1
104112 displayName: 'test'
105- inputs :
106- command : test
107- projects : ' $(Build.SourcesDirectory)\Microsoft.OpenApi.slnx'
108- arguments : ' --configuration $(BuildConfiguration) --no-build'
109113
110114 - task : EsrpCodeSigning@6
111115 displayName : ' ESRP CodeSigning binaries'
Original file line number Diff line number Diff line change 11version : 2
22updates :
3- - package-ecosystem : " github-actions"
4- # default location of `.github/workflows`
5- directory : " /"
6- open-pull-requests-limit : 10
7- schedule :
8- interval : " daily"
9- - package-ecosystem : " nuget"
10- # location of package manifests
11- directory : " /"
12- open-pull-requests-limit : 10
13- schedule :
14- interval : " daily"
15- groups :
16- MicrosoftExtensions :
17- patterns :
18- - " Microsoft.Extensions.*"
19- coverlet :
20- patterns :
21- - " coverlet.*"
22- - package-ecosystem : dotnet-sdk
23- directory : /
24- schedule :
25- interval : " daily"
26- ignore :
27- - dependency-name : ' *'
28- update-types :
29- - version-update:semver-major
30- - version-update:semver-minor
31- - package-ecosystem : " devcontainers"
32- directory : " /"
33- open-pull-requests-limit : 10
34- schedule :
35- interval : " daily"
3+ - package-ecosystem : github-actions
4+ directory : /
5+ open-pull-requests-limit : 10
6+ schedule :
7+ interval : daily
8+ groups :
9+ codeql :
10+ patterns :
11+ - github/codeql-action*
12+ cooldown :
13+ default-days : 7
14+ - package-ecosystem : nuget
15+ directory : /
16+ open-pull-requests-limit : 10
17+ schedule :
18+ interval : daily
19+ groups :
20+ MicrosoftExtensions :
21+ patterns :
22+ - Microsoft.Extensions.*
23+ testing :
24+ patterns :
25+ - coverlet.*
26+ - Microsoft.NET.Test.Sdk
27+ - Microsoft.Testing.*
28+ - xunit.*
29+ cooldown :
30+ default-days : 7
31+ - package-ecosystem : dotnet-sdk
32+ directory : /
33+ schedule :
34+ interval : daily
35+ ignore :
36+ - dependency-name : ' *'
37+ update-types :
38+ - version-update:semver-major
39+ - version-update:semver-minor
40+ cooldown :
41+ default-days : 7
42+ - package-ecosystem : devcontainers
43+ directory : /
44+ open-pull-requests-limit : 10
45+ schedule :
46+ interval : daily
47+ cooldown :
48+ default-days : 7
Original file line number Diff line number Diff line change 4545 id : run_unit_tests
4646 shell : pwsh
4747 run : |
48- dotnet test Microsoft.OpenApi.slnx -c Release --no-build -v n --collect:"XPlat Code Coverage"
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 6868 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="test/**/coverage.opencover.xml"
6969 dotnet workload restore
7070 dotnet build
71- dotnet test Microsoft.OpenApi.slnx --no-build -- verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat= opencover
72- dotnet tool run dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
71+ dotnet test --solution Microsoft.OpenApi.slnx --verbosity normal --coverlet --coverlet-output-format opencover --report-gh
72+ dotnet tool run dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
Original file line number Diff line number Diff line change 1313 </PropertyGroup >
1414
1515 <ItemGroup >
16- <PackageReference Include =" coverlet.msbuild" Version =" 8.0.0" PrivateAssets =" all" />
17- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 18.3.0" />
16+ <PackageReference Include =" coverlet.MTP" Version =" 10.0.1" PrivateAssets =" all" />
17+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 18.9.0" />
18+ <PackageReference Include =" Microsoft.Testing.Extensions.AzureDevOpsReport" Version =" 2.4.0" />
19+ <PackageReference Include =" Microsoft.Testing.Extensions.GitHubActionsReport" Version =" 2.4.0" />
1820 <PackageReference Include =" Moq" Version =" 4.20.72" />
1921 <PackageReference Include =" xunit.v3" Version =" 3.2.2" />
2022 <PackageReference Include =" xunit.runner.visualstudio" Version =" 3.1.5" PrivateAssets =" all" />
Original file line number Diff line number Diff line change 1515 </ItemGroup >
1616
1717 <ItemGroup >
18- <PackageReference Include =" coverlet.collector " Version =" 8 .0.1" PrivateAssets =" all" />
19- <PackageReference Include =" coverlet.msbuild " Version =" 8.0.1 " PrivateAssets = " all " />
20- <PackageReference Include =" Microsoft.NET.Test.Sdk " Version =" 18 .4.0" />
21- <PackageReference Include =" xunit.v3 " Version =" 3.2.2 " />
22- <PackageReference Include =" xunit.runner.visualstudio " Version =" 3.1.5 " PrivateAssets = " all " />
18+ <PackageReference Include =" coverlet.MTP " Version =" 10 .0.1" PrivateAssets =" all" />
19+ <PackageReference Include =" Microsoft.NET.Test.Sdk " Version =" 18.9.0 " />
20+ <PackageReference Include =" Microsoft.Testing.Extensions.AzureDevOpsReport " Version =" 2 .4.0" />
21+ <PackageReference Include =" Microsoft.Testing.Extensions.GitHubActionsReport " Version =" 2.4.0 " />
22+ <PackageReference Include =" xunit.v3 " Version =" 4.0.0 " />
2323 </ItemGroup >
2424
2525 <ItemGroup >
Original file line number Diff line number Diff line change 88 </PropertyGroup >
99
1010 <ItemGroup >
11- <PackageReference Include =" coverlet.collector" Version =" 8.0.0" PrivateAssets =" all" />
12- <PackageReference Include =" coverlet.msbuild" Version =" 8.0.0" PrivateAssets =" all" />
13- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 18.3.0" />
11+ <PackageReference Include =" coverlet.MTP" Version =" 10.0.1" PrivateAssets =" all" />
12+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 18.9.0" />
13+ <PackageReference Include =" Microsoft.Testing.Extensions.AzureDevOpsReport" Version =" 2.4.0" />
14+ <PackageReference Include =" Microsoft.Testing.Extensions.GitHubActionsReport" Version =" 2.4.0" />
1415 <PackageReference Include =" Moq" Version =" 4.20.72" />
1516 <PackageReference Include =" Verify.XunitV3" Version =" 31.28.0" />
1617 <PackageReference Include =" xunit.v3" Version =" 3.2.2" />
You can’t perform that action at this time.
0 commit comments