Skip to content

Add GitHub Actions CI for unit tests - #18

Merged
frarredondo merged 5 commits into
mainfrom
feat/ci-unit-tests
Aug 2, 2026
Merged

Add GitHub Actions CI for unit tests#18
frarredondo merged 5 commits into
mainfrom
feat/ci-unit-tests

Conversation

@frarredondo

Copy link
Copy Markdown
Owner

Summary

  • Closes Add unit test CI check on pull requests #17: add .github/workflows/ci.yml with job test on pull requests and pushes to main.
  • Installs uv sync --extra dev only (no Apple Silicon ML extras; unit tests do not need them).
  • Documents CI in README and CONTRIBUTING.

Test plan

  • Local uv run pytest green on this branch
  • Confirm the test check runs on this PR
  • After merge, optionally add test as a required status check on Protect main

Without an automated gate, regressions can land on main unnoticed; a
stable `test` job also unlocks a required status check later.
CI wraps long output paths across lines, so asserting an unbroken
basename substring in stdout was a false failure.
@frarredondo

Copy link
Copy Markdown
Owner Author

Babysit: CI test failed on test_cli_format_feed because Rich soft-wrapped the path (feed-a-e / p.json). Merged latest main (#16) and tightened the assertion to check ok/failed counts + output file instead of an unbroken basename in stdout.

Baseline unit coverage is ~65% statements / ~46% branches; gate only
statements for now and upload branch-aware reports to Codecov.
@frarredondo

Copy link
Copy Markdown
Owner Author

Added Codecov + coverage ratchet on top of CI:

Measured baseline (unit suite, no ML extras):

  • Statements / lines: ~65% → ratchet floor ≥ 65% (scripts/check_coverage_ratchet.py)
  • Branches: ~46% (reported, not gated)
  • Combined Cover column: ~60%

Also: README Codecov + CI badges, codecov.yml (informational statuses), pytest-cov in dev.

Action needed from you: create the project on codecov.io, add repo secret `CODECOV_TOKEN`. Upload step uses `fail_ci_if_error: false` so missing token won’t fail CI; the ratchet still enforces coverage.

@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

Allows raising the gate via a GitHub Actions repo variable without a code change.
@frarredondo

Copy link
Copy Markdown
Owner Author

COVERAGE_RATCHET_MIN is now a repo Actions variable (set to 65). CI passes it into the ratchet script; local default remains 65 if unset. Also set Codecov fail_ci_if_error: true now that CODECOV_TOKEN exists.

@frarredondo
frarredondo merged commit 082e28a into main Aug 2, 2026
1 check passed
@frarredondo
frarredondo deleted the feat/ci-unit-tests branch August 2, 2026 21:28
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.

Add unit test CI check on pull requests

2 participants