Skip to content

Add code coverage job with Codecov upload and workflow_dispatch trigger#1068

Merged
facontidavide merged 4 commits intomasterfrom
feature/codecov-ci
Feb 1, 2026
Merged

Add code coverage job with Codecov upload and workflow_dispatch trigger#1068
facontidavide merged 4 commits intomasterfrom
feature/codecov-ci

Conversation

@facontidavide
Copy link
Copy Markdown
Collaborator

@facontidavide facontidavide commented Jan 31, 2026

  • 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

Summary by CodeRabbit

  • Chores
    • Enhanced CI/CD workflow with manual dispatch capability.
    • Introduced automated code coverage collection and reporting to Codecov.
    • Streamlined workflow configuration by removing legacy comments.

✏️ Tip: You can customize this high-level summary in your review settings.

- 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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 31, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
GitHub Actions Workflow Configuration
.github/workflows/cmake_ubuntu.yml
Added workflow_dispatch trigger for manual workflow invocation, removed legacy comments, and introduced a new coverage job that builds with coverage flags, runs tests, collects lcov metrics, and uploads coverage data to Codecov.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A workflow takes flight with a tap and a touch,
Coverage flags bloom, collecting just much,
Codecov receives the metrics so bright,
Our tests now glow with quality light!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main changes: adding a code coverage job with Codecov upload and a workflow_dispatch trigger.
Description check ✅ Passed The description covers the key changes with specific implementation details, though it doesn't address the template's guidance on comments, API changes, or testing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/codecov-ci

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_dispatch trigger to allow manual runs of the Ubuntu CMake workflow.
  • Introduced a new coverage job that configures a Debug build with --coverage flags, runs tests, and collects coverage with lcov while excluding third-party, test, and example directories.
  • Configured automatic upload of the generated coverage.info report to Codecov using the Codecov GitHub Action.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

facontidavide and others added 2 commits February 1, 2026 18:43
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>
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 1, 2026

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>
@facontidavide facontidavide marked this pull request as ready for review February 1, 2026 18:35
@facontidavide facontidavide merged commit 1571da2 into master Feb 1, 2026
13 checks passed
@facontidavide facontidavide deleted the feature/codecov-ci branch February 1, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants