Skip to content

Commit ef76e46

Browse files
committed
fix: add junit xml coverage to sonar
1 parent ba74543 commit ef76e46

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
SEMVER: ${{ needs.set-deps-dotnet-poop-here.outputs.semVer }}
3737
steps:
3838
- uses: actions/checkout@v3
39+
with:
40+
fetch-depth: 0
3941
- name: install deps
4042
run: |
4143
apt update && apt install jq -y
@@ -47,7 +49,7 @@ jobs:
4749
uses: mikepenz/action-junit-report@v3
4850
if: always() # always run even if the previous step fails
4951
with:
50-
report_paths: '**/report-junit.xml'
52+
report_paths: '**/.coverage/report-junit.xml'
5153
- name: Analyze with SonarCloud
5254
# You can pin the exact commit or the version.
5355
uses: SonarSource/sonarcloud-github-action@master
@@ -57,8 +59,7 @@ jobs:
5759
with:
5860
# Additional arguments for the sonarcloud scanner
5961
args:
60-
# Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu)
6162
# mandatory
6263
-Dsonar.projectVersion=$SEMVER
6364
-Dsonar.go.coverage.reportPaths=/github/workspace/.coverage/out
64-
-X
65+
-Dsonar.go.tests.reportPaths=/github/workspace/.coverage/report-junit.xml

sonar-project.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ sonar.sources=.
88
sonar.exclusions=**/*_test.go,**/*_generated*.go,**/*_generated/**,**/vendor/**,**/examples/**
99
sonar.inclusions=**/*.go
1010

11-
# Encoding of the source code. Default is default system encoding
12-
1311
sonar.tests=.
1412
sonar.test.inclusions=**/*_test.go
1513
sonar.test.exclusions=**/*_generated*.go,**/*_generated/**,**/vendor/**

0 commit comments

Comments
 (0)