Skip to content

Add test coverage reporting to CI#7

Merged
johannmachemer merged 5 commits intomainfrom
feat/test-coverage-ci
Feb 27, 2026
Merged

Add test coverage reporting to CI#7
johannmachemer merged 5 commits intomainfrom
feat/test-coverage-ci

Conversation

@johannmachemer
Copy link
Contributor

Summary

  • Add unit tests for @yavio/shared, @yavio/db, and @yavio/cli to meet coverage thresholds
  • Configure @vitest/coverage-v8 with json-summary + json reporters across all packages
  • Set uniform 80/70/80 thresholds (lines & statements / branches / functions) on all packages
  • Update CI to run vitest --coverage, upload artifacts, and post per-package PR comments via davelosert/vitest-coverage-report-action

Coverage baselines

Package Lines Branch Funcs
shared 100% 100% 100%
db 100% 100% 100%
cli 94.6% 94.5% 100%
sdk 92.8% 80.9% 94.5%
ingest 88.2% 93.7% 96.8%
dashboard 84.3% 88.1% 88.9%

Test plan

  • All existing tests still pass
  • New shared/db/cli tests pass locally
  • Coverage thresholds enforced (build fails if coverage drops below 80/70/80)
  • PR comment appears with per-package coverage summary

…idation

Cover all exported modules — error code ranges and uniqueness, YavioError
serialization, Zod event schemas, and validation helpers.
…and exports

Test createDb, createClickHouseClient, withRLS transaction behavior,
schema table structure with foreign keys and indexes, and barrel exports.
Add error-path and edge-case tests for docker, doctor, down, init,
logs, reset, status, up, and update commands. Add entry point test
to verify all commands are registered.
- Add @vitest/coverage-v8 with json-summary + json reporters
- Set uniform 80/70/80 thresholds (lines/branches/functions) on all packages
- Run vitest with --coverage in each CI test job
- Upload coverage artifacts and post per-package PR comments via
  davelosert/vitest-coverage-report-action
@github-actions
Copy link

github-actions bot commented Feb 27, 2026

Coverage Report for shared

Status Category Percentage Covered / Total
🔵 Lines 100% 470 / 470
🔵 Statements 100% 470 / 470
🔵 Functions 100% 3 / 3
🔵 Branches 100% 7 / 7
File CoverageNo changed files found.
Generated in workflow #37 for commit 14a8cd7 by the Vitest Coverage Report Action

@github-actions
Copy link

github-actions bot commented Feb 27, 2026

Coverage Report for db

Status Category Percentage Covered / Total
🔵 Lines 100% 251 / 251
🔵 Statements 100% 251 / 251
🔵 Functions 100% 15 / 15
🔵 Branches 100% 35 / 35
File CoverageNo changed files found.
Generated in workflow #37 for commit 14a8cd7 by the Vitest Coverage Report Action

@github-actions
Copy link

github-actions bot commented Feb 27, 2026

Coverage Report for ingest

Status Category Percentage Covered / Total
🔵 Lines 88.22% 899 / 1019
🔵 Statements 88.22% 899 / 1019
🔵 Functions 96.82% 61 / 63
🔵 Branches 93.75% 270 / 288
File CoverageNo changed files found.
Generated in workflow #37 for commit 14a8cd7 by the Vitest Coverage Report Action

@github-actions
Copy link

github-actions bot commented Feb 27, 2026

Coverage Report for dashboard

Status Category Percentage Covered / Total
🔵 Lines 84.26% 1392 / 1652
🔵 Statements 84.26% 1392 / 1652
🔵 Functions 88.88% 88 / 99
🔵 Branches 88.11% 267 / 303
File CoverageNo changed files found.
Generated in workflow #37 for commit 14a8cd7 by the Vitest Coverage Report Action

@github-actions
Copy link

github-actions bot commented Feb 27, 2026

Coverage Report for cli

Status Category Percentage Covered / Total
🔵 Lines 94.63% 706 / 746
🔵 Statements 94.63% 706 / 746
🔵 Functions 100% 31 / 31
🔵 Branches 94.52% 190 / 201
File CoverageNo changed files found.
Generated in workflow #37 for commit 14a8cd7 by the Vitest Coverage Report Action

@github-actions
Copy link

github-actions bot commented Feb 27, 2026

Coverage Report for sdk

Status Category Percentage Covered / Total
🔵 Lines 92.75% 1523 / 1642
🔵 Statements 92.75% 1523 / 1642
🔵 Functions 94.54% 104 / 110
🔵 Branches 80.89% 415 / 513
File CoverageNo changed files found.
Generated in workflow #37 for commit 14a8cd7 by the Vitest Coverage Report Action

@johannmachemer johannmachemer merged commit acbb359 into main Feb 27, 2026
12 checks passed
@johannmachemer johannmachemer deleted the feat/test-coverage-ci branch February 27, 2026 10:34
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