File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 - name : Install SonarScanner for .NET
2727 run : |
2828 dotnet tool install --global dotnet-sonarscanner
29- dotnet tool install --global dotnet-reportgenerator-globaltool
29+ dotnet tool install --global dotnet-coverage
3030
3131 - name : Restore dependencies
3232 run : dotnet restore SLNX-validator.slnx
@@ -40,16 +40,13 @@ jobs:
4040 /o:"304notmodified" \
4141 /d:sonar.token="${SONAR_TOKEN}" \
4242 /d:sonar.host.url="https://sonarcloud.io" \
43- /d:sonar.coverageReportPaths ="coverage/SonarQube .xml"
43+ /d:sonar.cs.vscoveragexml.reportsPaths ="coverage.xml"
4444
4545 - name : Build
4646 run : dotnet build SLNX-validator.slnx --no-restore -c Release
4747
4848 - name : Test with coverage
49- run : dotnet test --solution SLNX-validator.slnx --no-build -c Release --verbosity normal -- --coverage --coverage-output-format cobertura
50-
51- - name : Convert coverage to SonarQube format
52- run : reportgenerator -reports:"**/TestResults/**/*.cobertura.xml" -targetdir:coverage -reporttypes:SonarQube
49+ run : dotnet-coverage collect "dotnet test --solution SLNX-validator.slnx --no-build -c Release --verbosity normal" -f xml -o coverage.xml
5350
5451 - name : End SonarCloud analysis
5552 env :
You can’t perform that action at this time.
0 commit comments