Skip to content

Show test coverage in core package README via Codecov badge#145

Merged
bedus-creation merged 1 commit into
mainfrom
task/readme-codecov-badge
Jul 3, 2026
Merged

Show test coverage in core package README via Codecov badge#145
bedus-creation merged 1 commit into
mainfrom
task/readme-codecov-badge

Conversation

@bedus-creation

Copy link
Copy Markdown
Contributor

Summary

Adds a live Codecov coverage badge to the core package README and wires CI to publish coverage.

Changes

  • Create fastapi_startkit/README.md (did not exist previously) with a live Codecov badge, plus PyPI/Python-version badges, an overview, install/extras, features, and development instructions.
  • Update .github/workflows/test.yml:
    • Collect coverage on the fastapi_startkit test run: pytest tests/ -v --cov --cov-report=xml.
    • Add a codecov/codecov-action@v5 step uploading fastapi_startkit/coverage.xml for slug fastapi-startkit/fastapi-startkit-modules (flag fastapi_startkit).

Coverage is already configured in fastapi_startkit/pyproject.toml (pytest-cov, [tool.coverage.*], source = src/fastapi_startkit), so no config changes were needed there.

Notes

  • The Codecov upload uses secrets.CODECOV_TOKEN; the badge renders live once the repo is set up on Codecov and coverage is uploaded from a CI run.
  • fail_ci_if_error: false keeps the test job green even if the upload has a transient failure.

Create fastapi_startkit/README.md with a live Codecov badge and
configure CI to collect coverage (--cov --cov-report=xml) and upload
the report to Codecov via codecov-action.

@bedus-creation bedus-creation left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

REVIEW VERDICT: APPROVE (posted as comment — GitHub blocks self-approval).

Docs + CI only, no code/ORM/SQL changes.

Verified:

  • --cov-report=xml writes coverage.xml into the fastapi_startkit working-directory; Codecov step's files: fastapi_startkit/coverage.xml (repo-root relative) resolves correctly.
  • README Codecov badge slug matches codecov-action slug (fastapi-startkit/fastapi-startkit-modules).
  • codecov-action@v5, token via secret, fail_ci_if_error: false.
  • README dev install command matches the CI install line exactly.

Note (non-blocking): enabling --cov activates the fail_under = 50 gate in pyproject, so the CI test job now fails if total coverage drops below 50%. Assumed intentional.

@bedus-creation bedus-creation merged commit d36c473 into main Jul 3, 2026
3 checks passed
@bedus-creation bedus-creation deleted the task/readme-codecov-badge branch July 3, 2026 16:19
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.

1 participant