Skip to content

Commit d30af62

Browse files
author
Gonzalo Diaz
committed
[CONFIG] sonarcloud coverage file path added.
1 parent e05a327 commit d30af62

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/rust-coverage.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,19 @@ jobs:
3535
--workspace
3636
--lcov
3737
--output-path lcov.info
38+
- name: Generate code coverage (xml)
39+
run: >
40+
cargo llvm-cov
41+
--cobertura
42+
--output-path cobertura-coverage.xml
3843
- name: Upload coverage artifact
3944
uses: actions/upload-artifact@v4
4045
with:
4146
name: coverage-report
4247
path: |
4348
lcov.info
4449
sonar-issues.json
50+
cobertura-coverage.xml
4551
4652
codecov:
4753
name: Upload to Codecov
@@ -61,7 +67,7 @@ jobs:
6167
- name: Upload coverage reports to Codecov with GitHub Action
6268
uses: codecov/codecov-action@v5
6369
with:
64-
files: coverage.out
70+
files: lcov.info
6571
token: ${{ secrets.CODECOV_TOKEN }} # required
6672
verbose: true # optional (default = false)
6773

@@ -87,4 +93,4 @@ jobs:
8793
with:
8894
args: >
8995
-Dsonar.externalIssuesReportPaths=sonar-issues.json
90-
-Dcommunity.rust.lcov.reportPaths=lcov.info
96+
-Dsonar.coverageReportPaths=cobertura-coverage.xml

sonar-project.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ sonar.organization=sir-gon
1111
#sonar.sources=.
1212

1313
# Encoding of the source code. Default is default system encoding
14-
#sonar.sourceEncoding=UTF-8
14+
#sonar.sourceEncoding=UTF-8
15+
16+
sonar.coverage.lcov.reportPaths=lcov.info

0 commit comments

Comments
 (0)