Fixing SonarCloud integration - 4

This commit is contained in:
2024-05-05 02:13:08 +02:00
parent af470ea869
commit 54be2c8732
2 changed files with 4 additions and 4 deletions

View File

@@ -45,6 +45,6 @@ jobs:
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"csimonapastore_BasicDotnetTemplate" /o:"csimonapastore-github" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet restore
dotnet build --no-incremental
dotnet test ./MainProject.Tests/MainProject.Tests.csproj --collect "Code Coverage" --results-directory "./TestResults"
dotnet build --no-incremental --no-restore --configuration Release
dotnet test ./MainProject.Tests/MainProject.Tests.csproj --no-restore --configuration Release --collect:"XPlat Code Coverage;Format=opencover" --logger "trx;LogFileName=test-results.trx" --results-directory "./TestResults"
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"