build: improve workflow for SonarCloud analysis in sonar-cloud.yml file

This commit is contained in:
Jean Gatto
2023-05-28 10:56:03 -03:00
parent 006acfc487
commit ecf7baa2d1
+3 -1
View File
@@ -53,5 +53,7 @@ jobs:
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"jeangatto_ASP.NET-Core-API-CQRS-EVENT-DDD-SOLID" /o:"jeangatto" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet restore && dotnet build --no-restore && dotnet test --no-build --no-restore --verbosity normal -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=TestResults/
dotnet restore
dotnet build --no-restore
dotnet test --no-build --no-restore --verbosity normal -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=TestResults/
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"