Skip to content

Commit c448f84

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 8b3891f commit c448f84

File tree

2 files changed

+31
-13
lines changed

2 files changed

+31
-13
lines changed

.github/workflows/codecov.yaml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,24 @@ 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+
pip install -r doc/requirements.txt --require-hashes
119+
sudo apt-get update
120+
sudo apt-get install -y graphviz # dot is needed but currently missing from the Docker image
121+
cmake -B doc/_build -S doc
122+
cmake --build doc/_build --target doxygen-coverage
123+
124+
- name: Upload Doxygen Coverage Results
125+
if: matrix.platform == 'unit_testing'
126+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
127+
with:
128+
name: Doxygen Coverage Results
129+
path: |
130+
doc/_build/new.info
131+
doc/_build/coverage-report
132+
115133
- name: Print ccache stats
116134
if: always()
117135
run: |
@@ -230,7 +248,7 @@ jobs:
230248
coverage/reports/coverage-report-${{ steps.run_date.outputs.run_date_short }}.json
231249
coverage/reports/coverage-report-${{ steps.run_date.outputs.run_date_short }}.xlsx
232250
233-
- name: Upload coverage to Codecov
251+
- name: Upload test coverage to Codecov
234252
if: always()
235253
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
236254
with:
@@ -240,3 +258,15 @@ jobs:
240258
token: ${{ secrets.CODECOV_TOKEN }}
241259
files: coverage/reports/merged.xml
242260
flags: unittests-coverage
261+
262+
- name: Upload Doxygen coverage to Codecov
263+
if: always()
264+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
265+
with:
266+
env_vars: OS,PYTHON
267+
fail_ci_if_error: false
268+
verbose: true
269+
token: ${{ secrets.CODECOV_TOKEN }}
270+
files: new.info
271+
disable_search: true
272+
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)