Commit 77b089a
authored
Fix codecov upload condition in CI workflow (#361)
* Fix codecov upload condition in CI workflow
The upload condition used 'discard' which never matches any matrix
value, preventing coverage data from being uploaded. Changed to 'ubuntu'
to match the actual os-type matrix value.
* Replace deprecated Codecov bash uploader with official GitHub Action
The bash uploader now requires a token and is deprecated.
Using codecov/codecov-action@v5 which handles authentication
automatically for public repos via GitHub OIDC.
* Add gcovr step to generate coverage report before Codecov upload
The codecov-action@v5 does not auto-process gcov data like the old bash
uploader did. This adds a step to run gcovr to convert .gcda/.gcno files
to Cobertura XML format, which codecov can parse.
* Add CODECOV_TOKEN for protected branch uploads
Codecov requires authentication token for uploading coverage reports
to protected branches.
* Trigger CI to test Codecov upload with token
* Add --root option to gcovr for correct source path mapping
The coverage report was unusable because gcovr generated paths relative
to the build directory (e.g., ../src/webserver.cpp). Adding --root ..
ensures paths are relative to the repository root, allowing Codecov to
correctly match source files.
* Exclude test directory from coverage reports
* Ignore tests1 parent e06f83a commit 77b089a
2 files changed
+15
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
668 | | - | |
| 668 | + | |
669 | 669 | | |
670 | | - | |
671 | | - | |
672 | | - | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments