Show test coverage in core package README via Codecov badge#145
Merged
Conversation
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
commented
Jul 3, 2026
bedus-creation
left a comment
Contributor
Author
There was a problem hiding this comment.
REVIEW VERDICT: APPROVE (posted as comment — GitHub blocks self-approval).
Docs + CI only, no code/ORM/SQL changes.
Verified:
--cov-report=xmlwritescoverage.xmlinto thefastapi_startkitworking-directory; Codecov step'sfiles: 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a live Codecov coverage badge to the core package README and wires CI to publish coverage.
Changes
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..github/workflows/test.yml:fastapi_startkittest run:pytest tests/ -v --cov --cov-report=xml.codecov/codecov-action@v5step uploadingfastapi_startkit/coverage.xmlfor slugfastapi-startkit/fastapi-startkit-modules(flagfastapi_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
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: falsekeeps the test job green even if the upload has a transient failure.