Skip to content

Commit 59522d6

Browse files
kartbennashif
authored andcommitted
ci: workflows: upload doxygen coverage to codecov together w/ unittests
Remove codecov upload from doc build workflow and instead ensure both test and doxygen coverage is uploaded in the same codecov.yml workflow, this way codecov report will accurately show the consolidated coverage for each "push" commit. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 3b43688 commit 59522d6

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

.github/workflows/codecov.yaml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,22 @@ jobs:
112112
-T tests --coverage-tool gcovr -xCONFIG_TEST_EXTRA_STACK_SIZE=4096 -e nano \
113113
--timeout-multiplier 2
114114
115+
- name: Build Doxygen Coverage
116+
if: matrix.platform == 'unit_testing'
117+
run: |
118+
sudo apt-get install -y graphviz # dot is needed but currently missing from the Docker image
119+
cmake -B doc/_build -S doc
120+
cmake --build doc/_build --target doxygen-coverage
121+
122+
- name: Upload Doxygen Coverage Results
123+
if: matrix.platform == 'unit_testing'
124+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
125+
with:
126+
name: Doxygen Coverage Results
127+
path: |
128+
doc/_build/new.info
129+
doc/_build/coverage-report
130+
115131
- name: Print ccache stats
116132
if: always()
117133
run: |
@@ -230,7 +246,7 @@ jobs:
230246
coverage/reports/coverage-report-${{ steps.run_date.outputs.run_date_short }}.json
231247
coverage/reports/coverage-report-${{ steps.run_date.outputs.run_date_short }}.xlsx
232248
233-
- name: Upload coverage to Codecov
249+
- name: Upload test coverage to Codecov
234250
if: always()
235251
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
236252
with:
@@ -240,3 +256,15 @@ jobs:
240256
token: ${{ secrets.CODECOV_TOKEN }}
241257
files: coverage/reports/merged.xml
242258
flags: unittests-coverage
259+
260+
- name: Upload Doxygen coverage to Codecov
261+
if: always()
262+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
263+
with:
264+
env_vars: OS,PYTHON
265+
fail_ci_if_error: false
266+
verbose: true
267+
token: ${{ secrets.CODECOV_TOKEN }}
268+
files: doc/_build/new.info
269+
disable_search: true
270+
flags: doxygen-coverage

.github/workflows/doc-build.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -164,18 +164,6 @@ jobs:
164164
name: api-coverage
165165
path: zephyr/api-coverage.tar.xz
166166

167-
- name: Upload Doxygen coverage to Codecov
168-
if: github.event_name == 'schedule'
169-
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
170-
with:
171-
env_vars: OS,PYTHON
172-
fail_ci_if_error: false
173-
verbose: true
174-
token: ${{ secrets.CODECOV_TOKEN }}
175-
working-directory: zephyr
176-
files: new.info
177-
disable_search: true
178-
flags: doxygen-coverage
179167

180168
- name: process-pr
181169
if: github.event_name == 'pull_request'

0 commit comments

Comments
 (0)