File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656 if : github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
5757 run : dotnet tool update dotnet-sonarscanner --tool-path .sonar/scanner
5858
59+ - name : Install dotnet-coverage tool
60+ if : github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
61+ run : dotnet tool update dotnet-coverage --global
62+
5963 - name : Begin SonarCloud analysis
6064 if : github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
6165 run : |
@@ -64,19 +68,25 @@ jobs:
6468 /o:"visus" \
6569 /d:sonar.token="$SONAR_TOKEN" \
6670 /d:sonar.host.url="https://sonarcloud.io" \
67- /d:sonar.cs.vscoveragexml.reportsPaths="**/TestResults/**/ coverage.xml" \
71+ /d:sonar.cs.vscoveragexml.reportsPaths="coverage.xml" \
6872 /d:sonar.cs.vstest.reportsPaths="**/TestResults/**/*.trx"
6973
7074 - name : Build
7175 run : dotnet build -c Release --no-restore
7276
7377 - name : Run tests
7478 run : |
75- dotnet test -c Release --no-build --no-restore \
79+ dotnet test -c Release --no-build --no-restore -- \
7680 --coverage \
77- --coverage-output coverage.xml \
7881 --coverage-output-format xml \
79- -- --report-trx
82+ --report-trx
83+
84+ - name : Merge coverage reports
85+ if : github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
86+ run : |
87+ dotnet-coverage merge "tests/**/TestResults/*.xml" \
88+ --output coverage.xml \
89+ --output-format xml
8090
8191 - name : Upload test results
8292 if : always()
You can’t perform that action at this time.
0 commit comments