Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Overview

Integrates Codecov into the CI pipeline to automatically track code coverage on every PR and commit.

Changes

  • Unit Tests job: Added coverage generation with bun test --coverage and upload to Codecov with unit-tests flag
  • Integration Tests job: Added coverage generation with jest --coverage and upload to Codecov with integration-tests flag
  • Renamed "Test" job to "Unit Tests" for clarity
  • Set fail_ci_if_error: false on uploads to avoid blocking PRs if Codecov has issues

How It Works

Codecov automatically merges the two coverage reports into a unified view:

  • See overall coverage across both test types
  • See per-flag coverage (unit vs integration) to understand which tests cover which code
  • Coverage reports appear as PR comments
  • Historical trends tracked over time

Setup Required

The CODECOV_TOKEN secret has already been configured in GitHub Actions settings.

Generated with cmux

- Add coverage generation to unit tests job with bun test --coverage
- Add coverage generation to integration tests job with jest --coverage
- Upload coverage reports to Codecov with appropriate flags (unit-tests, integration-tests)
- Set fail_ci_if_error: false to not block PRs on Codecov upload failures

Generated with `cmux`
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

- Disable PR comments (comment: false)
- Make all status checks informational (won't block PRs)
- Track unit-tests and integration-tests flags separately
- Ignore test files and build artifacts from coverage

_Generated with `cmux`_
Add --coverage-reporter=lcov flag to ensure bun generates lcov.info file.
Without this flag, bun defaults to 'text' reporter which only prints to
stdout and doesn't generate the coverage file needed for Codecov upload.

Addresses Codex review feedback.

_Generated with `cmux`_
@ammario ammario merged commit 53f7f02 into main Oct 20, 2025
8 of 9 checks passed
@ammario ammario deleted the coverage branch October 20, 2025 17:06
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