Add code coverage job with Codecov upload and workflow_dispatch trigger#1068
Add code coverage job with Codecov upload and workflow_dispatch trigger#1068facontidavide merged 4 commits intomasterfrom
Conversation
- Add workflow_dispatch trigger to enable manual runs via `gh workflow run` - Add separate `coverage` job that builds in Debug mode with `--coverage` flags - Use lcov to collect and filter coverage data (excludes 3rdparty, tests, examples) - Upload coverage.info to Codecov using CODECOV_TOKEN secret - Keep existing Release build job unchanged Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
📝 WalkthroughWalkthroughThe workflow file was enhanced with manual dispatch triggering capability, legacy comments removed, and a new coverage job added to compile with coverage instrumentation, execute tests, collect coverage metrics via lcov, and report results to Codecov. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR enhances the Ubuntu CMake GitHub Actions workflow by adding a manually-triggerable run and a dedicated coverage job that collects and uploads code coverage to Codecov.
Changes:
- Added a
workflow_dispatchtrigger to allow manual runs of the Ubuntu CMake workflow. - Introduced a new
coveragejob that configures a Debug build with--coverageflags, runs tests, and collects coverage withlcovwhile excluding third-party, test, and example directories. - Configured automatic upload of the generated
coverage.inforeport to Codecov using the Codecov GitHub Action.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The --ignore-errors mismatch and --ignore-errors unused flags require lcov 2.x, which is not available on ubuntu-22.04. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Multi-threaded tests cause race conditions on gcov counters, producing negative counts that make lcov fail. Add -fprofile-update=atomic to compiler flags and --ignore-errors negative to lcov as a safety net. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
gh workflow runcoveragejob that builds in Debug mode with--coverageflagsSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.