Skip to content

Commit

Permalink
Collect code coverage via coverlet
Browse files Browse the repository at this point in the history
  • Loading branch information
Namoshek committed Jan 25, 2025
1 parent b96cb77 commit 98c341b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ jobs:
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: Install dotnet-coverage
if: matrix.run-sonarqube-analysis
shell: bash
run: dotnet tool install --global dotnet-coverage

- name: Cache SonarCloud packages
uses: actions/cache@v4
if: matrix.run-sonarqube-analysis
Expand Down Expand Up @@ -80,9 +75,9 @@ jobs:
/o:"namoshek" `
/d:sonar.host.url="https://sonarcloud.io" `
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" `
/d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
/d:sonar.cs.opencover.reportsPaths=coverage.opencover.xml
dotnet build --configuration "Release" --no-incremental
dotnet-coverage collect 'dotnet test' -f xml -o 'coverage.xml'
dotnet test --collect:"XPlat Code Coverage;Format=opencover"
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
- name: Build package
Expand Down

0 comments on commit 98c341b

Please sign in to comment.