Skip to content

ci: measure coverage on the unit suite too - #23

Merged
AlexeyShalaev merged 1 commit into
masterfrom
ci/coverage-from-both-suites
Sep 6, 2026
Merged

AlexeyShalaev merged 1 commit into
masterfrom
ci/coverage-from-both-suites

Conversation

@AlexeyShalaev

Copy link
Copy Markdown
Member

codecov/patch fails on any pull request that touches code outside the Redis repository, and it is not the pull request's fault.

Coverage is collected in one place: the integration job runs pytest -m integration --cov=idempotency_kit and uploads that report. The unit matrix runs pytest -m unit with no coverage at all. So everything exercised only by unit tests reads as uncovered to Codecov, and a diff made mostly of unit-covered code arrives as a red patch status. The unit suite on its own reaches 95.66% of the package, none of which Codecov has ever seen.

This adds --cov to the unit run and uploads it from the 3.13 matrix entry, with flags: unit on that upload and flags: integration on the existing one so Codecov merges the two reports rather than letting the second overwrite the first. Nothing else changes: the integration job keeps its own --cov-fail-under=50, the unit job keeps the 85% floor that pyproject.toml already sets, and the upload stays continue-on-error so Codecov being down cannot fail a build.

codecov/patch is not the required status check — All checks passed is — so this was never blocking a merge. It was making every pull request look broken.

Found while fixing the findings in #22, which is where the red patch status shows. That branch turns green once it is updated on top of this.

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AlexeyShalaev
AlexeyShalaev merged commit 4f5dc29 into master Sep 6, 2026
7 checks passed
@AlexeyShalaev
AlexeyShalaev deleted the ci/coverage-from-both-suites branch September 6, 2026 18:45
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