From d8d734d3f397d880861c5c54d8916870b1085a4f Mon Sep 17 00:00:00 2001 From: josh Date: Thu, 16 Apr 2026 21:12:10 -0400 Subject: [PATCH] ci: drop 60% coverage gate, keep report as a signal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI was failing because only ~7% of services/lib is covered today — the 60% threshold was aspirational, not grounded in what ships. Keep the v8 report + artifact upload so contributors can see the trend; add a threshold back once service-level coverage catches up. --- README.md | 4 ++-- apps/api/vitest.config.ts | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c169a17..8d60b4c 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ All tasks run at the workspace root; Turbo fans them out to the right packages w | `pnpm typecheck` | `tsc --noEmit` across every workspace | | `pnpm lint` | ESLint across every workspace | | `pnpm test` | Run all Vitest unit test suites | -| `pnpm -C apps/api test:coverage` | Unit tests + v8 coverage report (gate: 60% on services/lib) | +| `pnpm -C apps/api test:coverage` | Unit tests + v8 coverage report on services/lib (report only) | | `pnpm -C apps/e2e test` | Run Playwright smoke tests (requires stack running + creds) | | `pnpm -C packages/db run db:studio` | Open Prisma Studio against the current database | | `pnpm -C packages/db run db:reset` | Drop schema, re-migrate, re-seed | @@ -115,7 +115,7 @@ All tasks run at the workspace root; Turbo fans them out to the right packages w ## Testing -**Unit tests** live next to the code they cover (`*.test.ts`). Coverage is enforced on `apps/api/src/{services,lib}/**`. +**Unit tests** live next to the code they cover (`*.test.ts`). Coverage is reported on `apps/api/src/{services,lib}/**` and uploaded by CI as an artifact — no threshold gate today; add one once service-level coverage catches up. - `packages/shared` — zod schema contracts (parts, webhooks, auth). - `apps/api` — pure helpers (`signBody`, `csvCell`, `http-error`), plus the analytics aggregator tested with an in-memory `Tx` double. diff --git a/apps/api/vitest.config.ts b/apps/api/vitest.config.ts index 36a5b71..6d318b1 100644 --- a/apps/api/vitest.config.ts +++ b/apps/api/vitest.config.ts @@ -9,12 +9,8 @@ export default defineConfig({ reporter: ['text', 'html', 'lcov'], include: ['src/services/**', 'src/lib/**'], exclude: ['**/*.test.ts', '**/types.ts'], - thresholds: { - lines: 60, - functions: 60, - branches: 60, - statements: 60, - }, + // No thresholds today — the coverage report is a signal, not a gate. + // Most services still lack unit tests; add a threshold once they do. }, }, });