Fix codecov upload condition in CI workflow#361
Merged
Conversation
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.
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.
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.
Codecov requires authentication token for uploading coverage reports to protected branches.
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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #361 +/- ##
===========================================
- Coverage 95.59% 61.98% -33.61%
===========================================
Files 35 28 -7
Lines 3222 1339 -1883
Branches 0 562 +562
===========================================
- Hits 3080 830 -2250
+ Misses 142 126 -16
- Partials 0 383 +383 see 28 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the broken Codecov upload in GitHub Actions by correcting a typo that prevents coverage data from ever being uploaded.
Problem
In
.github/workflows/verify-build.ymlat line 672, the upload condition usesmatrix.os-type == 'discard'which never matches any matrix value. This should be'ubuntu'.Changes
Single character fix:
'discard'→'ubuntu'Verification