Commit 976d8f9 1 parent a278723 commit 976d8f9 Copy full SHA for 976d8f9
File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
- script : |
18
18
dotnet tool install --global dotnet-sonarscanner
19
+ dotnet tool install --global dotnet-coverage
19
20
dotnet tool install --global coverlet.console
20
21
displayName: 'Install dotnet tools'
21
22
32
33
displayName: 'dotnet dev-certs https'
33
34
34
35
- script : |
35
- dotnet sonarscanner begin /k:"WireMock-Net_WireMock.Net" /o:"wiremock-net" /d:sonar.branch.name=$(Build.SourceBranchName) /d:sonar.host.url="https://sonarcloud.io" /d:sonar.token="$(SONAR_TOKEN)" /d:sonar.dotnet.excludeTestProjects=true /d:sonar.cs.opencover.reportsPaths=coverage.xml /d:sonar.verbose=true
36
+ # dotnet sonarscanner begin /k:"WireMock-Net_WireMock.Net" /o:"wiremock-net" /d:sonar.branch.name=$(Build.SourceBranchName) /d:sonar.host.url="https://sonarcloud.io" /d:sonar.token="$(SONAR_TOKEN)" /d:sonar.dotnet.excludeTestProjects=true /d:sonar.cs.opencover.reportsPaths=coverage.xml /d:sonar.verbose=true
37
+ dotnet sonarscanner begin /k:"WireMock-Net_WireMock.Net" /o:"wiremock-net" /d:sonar.branch.name=$(Build.SourceBranchName) /d:sonar.host.url="https://sonarcloud.io" /d:sonar.token="$(SONAR_TOKEN)" /d:sonar.dotnet.excludeTestProjects=true sonar.cs.vscoveragexml.reportsPaths=coverage.xml /d:sonar.verbose=true
36
38
displayName: 'Begin analysis on SonarCloud'
37
39
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # Do not run for PullRequests
38
40
45
47
46
48
- task : CmdLine@2
47
49
inputs :
48
- script : |
49
- coverlet ./test/WireMock.Net.Tests/bin/Debug/net8.0/WireMock.Net.Tests.dll --target "dotnet" --targetargs "test --no-build --configuration Debug --framework net8.0" -f=opencover -o="coverage.xml"
50
+ script : ' dotnet-coverage collect "dotnet test" ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj -f xml -o "coverage.xml" '
51
+ # script: coverlet ./test/WireMock.Net.Tests/bin/Debug/net8.0/WireMock.Net.Tests.dll --target "dotnet" --targetargs "test --no-build --configuration Debug --framework net8.0" -f=opencover -o="coverage.xml"
50
52
# script: 'dotnet test ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj --no-build --configuration Debug --framework net8.0'
51
53
displayName : ' Execute Unit Tests with Coverage'
52
54
You can’t perform that action at this time.
0 commit comments