Skip to content

Commit 975c487

Browse files
author
Gonzalo Diaz
committed
[CONFIG] Sonarcloud script for github-actions.
1 parent af45cd3 commit 975c487

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ jobs:
4545
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4646
shell: powershell
4747
run: |
48-
.\.sonar\scanner\dotnet-sonarscanner begin /k:"sir-gon_algorithm-exercises-csharp" /o:"sir-gon" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
48+
.\.sonar\scanner\dotnet-sonarscanner begin /k:"sir-gon_algorithm-exercises-csharp" /o:"sir-gon" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths=**/coverage.opencover.xml
49+
4950
dotnet restore
5051
dotnet build --no-restore
5152
dotnet test --no-build --verbosity normal

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,7 @@ _NCrunch*
138138

139139
# Coverage
140140
coverage.cobertura.xml
141+
coverage.opencover.xml
142+
coverage.info
141143
coverage.json
142144
lcov.info

algorithm-exercises-csharp-test/algorithm-exercises-csharp-test.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313

1414
<!-- Coverage -->
1515
<CollectCoverage>true</CollectCoverage>
16-
<CoverletOutputFormat>lcov</CoverletOutputFormat>
17-
<CoverletOutput>./lcov.info</CoverletOutput>
16+
<CoverletOutputFormat>lcov,opencover</CoverletOutputFormat>
1817
<IncludeTestAssembly>true</IncludeTestAssembly>
1918

2019
<!-- Static Analysis -->

0 commit comments

Comments
 (0)