Skip to content

ci: upload coverage to Codecov and add the badge - #84

Draft
aryansk wants to merge 1 commit into
shauryagangrade:mainfrom
aryansk:ci/codecov-upload
Draft

ci: upload coverage to Codecov and add the badge#84
aryansk wants to merge 1 commit into
shauryagangrade:mainfrom
aryansk:ci/codecov-upload

Conversation

@aryansk

@aryansk aryansk commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Closes #64.

Problem

CI already runs coverage run -m pytest and uploads .coverage artifacts, but nothing aggregates or publishes the numbers — #24 asked for visible coverage tracking.

Change

  • The test job now emits coverage.xml (uv run coverage xml) after the coverage run.
  • Uploads it with codecov/codecov-action@v6 on every matrix job (main push + PR). fail_ci_if_error: false keeps CI green until the Codecov token secret or Codecov app is configured for the repo.
  • coverage.xml added to .gitignore (generated artifact).
  • Codecov badge added to the README next to the build badge.

Acceptance criteria

  • Coverage is visible on Codecov with a PR status check once the Codecov token/app is configured — the upload step is in place on every run.
  • README shows the badge.

Validation

  • Workflow YAML parses.
  • Local simulation of the pipeline (uv run coverage run -m pytest && uv run coverage report && uv run coverage xml): 107 tests passed, coverage.xml generated successfully.
  • git diff --check clean.

The test job already runs coverage and uploads .coverage artifacts, but no
one aggregates or publishes the numbers. Emit coverage.xml in the test job
and upload it with codecov/codecov-action (fail_ci_if_error: false so CI
stays green until the Codecov token or app is configured), gitignore the
generated file, and add the Codecov badge to the README next to the build
badge. Fixes shauryagangrade#64.
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.

[DevOps]: Upload coverage to Codecov and add a badge (follow-up to #24)

1 participant