Skip to content

Commit 0eb272a

Browse files
committed
Use gcovr directly for code coverage.
1 parent 6d277c2 commit 0eb272a

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

.github/workflows/build_dependencies.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
with:
113113
repository: eBay/nuraft_mesg
114114
path: import/nuraft_mesg
115-
ref: main
115+
ref: stable/v3.x
116116
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}
117117

118118
- name: Load NuRaftMesg Cache
@@ -129,7 +129,7 @@ jobs:
129129
with:
130130
repository: eBay/HomeStore
131131
path: import/homestore
132-
ref: master
132+
ref: stable/v6.x
133133
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}
134134

135135
- name: Load HomeStore Cache
@@ -141,7 +141,6 @@ jobs:
141141
fail_on_cache_miss: true
142142
if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }}
143143

144-
145144
- name: Setup Conan
146145
uses: eBay/sisl/.github/actions/setup_conan@master
147146
with:
@@ -232,6 +231,7 @@ jobs:
232231

233232
- name: Code Coverage Run
234233
run: |
234+
python -m pip install gcovr
235235
conan install \
236236
-o sisl:malloc_impl=${{ inputs.malloc-impl }} \
237237
-o iomgr:testing=off \
@@ -241,11 +241,12 @@ jobs:
241241
--build missing \
242242
.
243243
conan build .
244+
gcovr --cobertura ./coverage.xml
244245
if: ${{ inputs.testing == 'True' && inputs.tooling == 'Coverage' }}
245246

246247
- name: Upload coverage reports to Codecov
247-
uses: codecov/codecov-action@v4
248+
uses: codecov/codecov-action@v5
248249
with:
249-
token: ${{ secrets.CODECOV_TOKEN }}
250-
gcov: true
250+
files: ./coverage.xml
251+
disable_search: true
251252
if: ${{ inputs.testing == 'True' && inputs.tooling == 'Coverage' }}

gcovr.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
high-threshold = 80
2+
medium-threshold = 65
3+
4+
merge-lines = yes
5+
exclude-unreachable-branches = yes
6+
7+
exclude = .*build.*
8+
exclude = .*flip.*
9+
exclude = .*generate.*
10+
exclude = .*test.*
11+
12+
13+
exclude-lines-by-pattern = .*DEBUG.*
14+
exclude-lines-by-pattern = .*DBG.*
15+
exclude-lines-by-pattern = .*LOG.*
16+
17+
gcov-ignore-parse-errors = all

0 commit comments

Comments
 (0)