Skip to content

Commit 00cc80e

Browse files
committed
Update the dotnet.yml to resolve the current lack
of code coverage in SonarCloud/Qube
1 parent 1d68efe commit 00cc80e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/dotnet.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- main
77
pull_request:
88
types: [ opened, synchronize, reopened ]
9+
env:
10+
SONAR_PROJECT: astar-dev-functional-extensions
911

1012
jobs:
1113
build:
@@ -51,7 +53,7 @@ jobs:
5153
shell: powershell
5254
run: |
5355
dotnet tool install --global dotnet-coverage
54-
.\.sonar\scanner\dotnet-sonarscanner begin /k:"astar-development_astar-dev-functional-extensions" /o:"astar-development" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.scanner.scanAll=false
55-
dotnet build
56+
.\.sonar\scanner\dotnet-sonarscanner begin /k:"astar-development_${{ env.SONAR_PROJECT }}" /o:"astar-development" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml /d:sonar.scanner.scanAll=false /d:sonar.scanner.skipJreProvisioning=true
57+
dotnet build --configuration Release
5658
dotnet-coverage collect 'dotnet test --filter "FullyQualifiedName!~Tests.EndToEnd"' -f xml -o 'coverage.xml'
5759
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"

0 commit comments

Comments
 (0)