ci: Fix broken code coverage in SonarCloud

- Properly format coverlet coverage report
- Set path to coverage reports

Documented here:

- https://github.com/coverlet-coverage/coverlet/issues/955
- https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md#passing-runsettings-arguments-through-commandline
pull/47/head
Robert Dailey 3 years ago
parent dc056204fe
commit 45e6bd6a3b

@ -88,16 +88,17 @@ jobs:
-k:"rcdailey_trash-updater" -k:"rcdailey_trash-updater"
-n:"Trash Updater" -n:"Trash Updater"
-v:"${{ steps.nbgv.outputs.SimpleVersion }}" -v:"${{ steps.nbgv.outputs.SimpleVersion }}"
-d:"sonar.login=${{ secrets.SONAR_TOKEN }}" -d:sonar.login="${{ secrets.SONAR_TOKEN }}"
-d:"sonar.host.url=https://sonarcloud.io" -d:sonar.host.url="https://sonarcloud.io"
-d:sonar.cs.opencover.reportsPaths="**/TestResults/*/coverage.opencover.xml"
- name: Test - name: Test
run: dotnet test src --collect:"XPLat Code Coverage" run: dotnet test src --collect:"XPLat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: End Sonar Scanner - name: End Sonar Scanner
run: > run: >
dotnet sonarscanner end dotnet sonarscanner end
-d:"sonar.login=${{ secrets.SONAR_TOKEN }}" -d:sonar.login="${{ secrets.SONAR_TOKEN }}"
release: release:
name: Release name: Release

Loading…
Cancel
Save