Skip to content

Enforce meaningful branch coverage - #5

Merged
smigolsmigol merged 4 commits into
mainfrom
test/branch-coverage-90
Aug 22, 2026
Merged

smigolsmigol merged 4 commits into
mainfrom
test/branch-coverage-90

Conversation

@smigolsmigol

Copy link
Copy Markdown
Owner

CI's cached source install reproduced pydantic-canary 0.1.1 while the checked-out tree was 0.1.2. That made the existing green matrix capable of testing stale bytes. Subprocess-aware branch coverage was also 73%.

This change:

  • forces package-install jobs to build the checked-out source and adds a Windows 3.12 test job
  • adds protocol, input, CLI, and comparison failure-path tests
  • enforces a 90% branch-coverage floor and a 100% patch target, reported through Codecov

Validation:

  • 54 tests pass on Python 3.10 through 3.14
  • 97% branch coverage across 424 statements and 132 branches
  • Ruff, Actionlint, Codecov configuration validation, package build, and exact-wheel tests pass

Exercise worker protocol, CLI, and comparison failure paths before
enforcing a 90% branch-coverage floor. Disable the reusable package
cache for source tests so CI cannot validate stale release bytes.
The package-install jobs intentionally disable uv's reusable cache to
guarantee current-source builds. Disable setup-uv's post-job cache save
too, which otherwise fails when the cache directory is absent.
setup-uv v9 enables caching by default. Mark the no-cache package test
jobs explicitly so post-job cleanup does not fail on an absent cache
directory.
Limit push-triggered runs to main and release tags. Pull request
branches keep the full matrix through the pull_request event without
duplicating the same head.
@smigolsmigol
smigolsmigol marked this pull request as ready for review August 22, 2026 20:01
@smigolsmigol
smigolsmigol merged commit 8eb4375 into main Aug 22, 2026
17 of 18 checks passed
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