File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 dotnet-version : 10.0.x
2525
2626 - name : Install SonarScanner for .NET
27- run : dotnet tool install --global dotnet-sonarscanner
27+ run : |
28+ dotnet tool install --global dotnet-sonarscanner
29+ dotnet tool install --global dotnet-reportgenerator-globaltool
2830
2931 - name : Restore dependencies
3032 run : dotnet restore SLNX-validator.slnx
@@ -38,14 +40,17 @@ jobs:
3840 /o:"304notmodified" \
3941 /d:sonar.token="${SONAR_TOKEN}" \
4042 /d:sonar.host.url="https://sonarcloud.io" \
41- /d:sonar.coverageReportPaths="**/TestResults/**/*.cobertura .xml"
43+ /d:sonar.coverageReportPaths="coverage/SonarQube .xml"
4244
4345 - name : Build
4446 run : dotnet build SLNX-validator.slnx --no-restore -c Release
4547
4648 - name : Test with coverage
4749 run : dotnet test --solution SLNX-validator.slnx --no-build -c Release --verbosity normal -- --coverage --coverage-output-format cobertura
4850
51+ - name : Convert coverage to SonarQube format
52+ run : reportgenerator -reports:"**/TestResults/**/*.cobertura.xml" -targetdir:coverage -reporttypes:SonarQube
53+
4954 - name : End SonarCloud analysis
5055 env :
5156 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
You can’t perform that action at this time.
0 commit comments