Skip to content

fix(ci): combine test-linux + test-postgres coverage for 80% threshold (#99) - #121

Merged
jphein merged 2 commits into
mainfrom
feat/ci-combined-coverage
May 22, 2026
Merged

fix(ci): combine test-linux + test-postgres coverage for 80% threshold (#99)#121
jphein merged 2 commits into
mainfrom
feat/ci-combined-coverage

Conversation

@jphein

@jphein jphein commented May 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #99. Restores the meaningful 80% coverage threshold by combining coverage artifacts across the matrix instead of enforcing per-job.

Previously each test-linux matrix run enforced --cov-fail-under=79 (down from 80 in #98, because postgres-backend paths only run in test-postgres, so adding postgres-only code mechanically dragged test-linux coverage down even when test-postgres covered it at 100%).

Changes

  • test-linux (3.9/3.11/3.13): drops --cov-fail-under, uploads .coverage as coverage-linux-<py> artifact
  • test-postgres: now runs with --cov=mempalace, uploads .coverage as coverage-postgres artifact
  • New check-coverage job: needs: [test-linux, test-postgres], downloads all coverage-* artifacts, runs coverage combine + coverage report --fail-under=80
  • Cleans up the now-stale cov-fail-under: 79 explanatory comment blocks from all three matrix-job sites

The single threshold gate now sees the union of test-linux and test-postgres coverage, so:

  • a regression in linux-covered code trips it
  • a regression in postgres-only code also trips it
  • new postgres-only code no longer drags the bar down artificially

Test plan

  • CI passes (the new check-coverage job is itself the validation — if it doesn't fail at 80%, the combine worked)
  • Local pytest still green (2451 passed, 35 skipped, 106 deselected — verified before commit)

#99)

Each test job uploads its `.coverage` file as a uniquely-named artifact.
A new `check-coverage` job downloads them all, runs `coverage combine`,
and enforces `--fail-under=80` once against the merged dataset.

Removes per-job `--cov-fail-under=79` (workaround introduced in #98 when
postgres-backend paths started dragging test-linux coverage down even
though test-postgres covers them).

- test-linux: matrix uploads `coverage-linux-<py>` artifacts
- test-postgres: now runs with `--cov`, uploads `coverage-postgres`
- check-coverage: needs both, downloads `coverage-*`, combines, gates 80%

Closes #99.
Copilot AI review requested due to automatic review settings May 22, 2026 22:02
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

pyproject.toml sets [tool.coverage.report] fail_under = 85, which
applies to every --cov run. Per-job test runs need --cov-fail-under=0
to disable that; the 80% threshold is enforced only in the combined
check-coverage job.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jphein
jphein merged commit 516dbd7 into main May 22, 2026
7 of 8 checks passed
@jphein
jphein deleted the feat/ci-combined-coverage branch May 22, 2026 22:31
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.

CI: combine test-linux + test-postgres coverage so threshold can return to 80%+

2 participants