Skip to content

Commit a0b0fd1

Browse files
committed
fix: enhance coverage collection and merging in dotnet workflow
1 parent 4b6a2b6 commit a0b0fd1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/dotnet.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ jobs:
7373
dotnet restore
7474
./.sonar/scanner/dotnet-sonarscanner begin /k:"magic5644_codeLineCounter" /o:"magic5644" /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
7575
dotnet build --no-incremental
76-
dotnet-coverage collect 'dotnet test --no-build' -f xml -o 'coverage.xml'
76+
dotnet-coverage collect 'dotnet test --no-build --results-directory "test-results" --collect:"Code Coverage"' -f xml -o 'coverage.xml'
77+
dotnet-coverage merge --output coverage.xml --output-format xml "test-results/**/*.coverage"
7778
./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
7879
7980
- name: Build Release

0 commit comments

Comments
 (0)