Skip to content

Commit 484b24b

Browse files
authored
Merge pull request #185 from JSkimming/sonarcloud-coverage
Add code coverage for SonarCloud scanner
2 parents 370cda3 + f4d658f commit 484b24b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,6 @@ jobs:
142142
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
143143
shell: powershell
144144
run: |
145-
.\.sonar\scanner\dotnet-sonarscanner begin /k:"JSkimming_Castle.Core.AsyncInterceptor" /o:"jskimming" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
146-
dotnet build
145+
.\.sonar\scanner\dotnet-sonarscanner begin /k:"JSkimming_Castle.Core.AsyncInterceptor" /o:"jskimming" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths=test\Castle.Core.AsyncInterceptor.Tests\coverage.net7.0.opencover.xml
146+
dotnet test -f net7.0 -c Release test\Castle.Core.AsyncInterceptor.Tests\Castle.Core.AsyncInterceptor.Tests.csproj -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:Include=[Castle.Core.AsyncInterceptor]* -p:Exclude=[Castle.Core.AsyncInterceptor]*.NoCoverage.*
147147
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"

0 commit comments

Comments
 (0)