feat(ci): add vitest code coverage analysis#32
Conversation
Resolves Evaliphy#20. Adds coverage reporting via @vitest/coverage-v8: - vitest.config.ts: new root config with coverage provider (v8), reporters (text/lcov/html), package alias resolution, and minimum thresholds (60% lines/functions/statements, 50% branches) - package.json: add @vitest/coverage-v8 devDependency; add test:coverage script (vitest run --coverage) - test.yml: add Coverage step after Test; upload coverage/ as a workflow artifact retained for 30 days Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Someone is attempting to deploy a commit to the priyanshus's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@quanticsoul4772 Thanks for the PR. Can you please check why tests are failing. |
|
Tests aren't actually running, CI fails at the install step: |
The parent commit added @vitest/coverage-v8 to devDependencies but did not update the lockfile, so CI's `pnpm install --frozen-lockfile` failed with ERR_PNPM_OUTDATED_LOCKFILE. Verified `pnpm install --frozen-lockfile` now succeeds locally. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@priyanshus The failing check was the install step, not the tests — CI rejected Pushed Orthogonal note (not caused by this PR): |
Lines/statements/branches were set above actual measured coverage (55.32% / 54.21% / 46.39%), causing CI to fail. Set floors just below actuals so the check acts as a regression guard rather than a blocker. Raise thresholds as coverage improves. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Pushed CI failure cause: The thresholds I set (lines: 60%, statements: 60%, branches: 50%) were above actual measured coverage. CI reported:
Fix: Thresholds now set just below actuals to act as a regression floor:
These values prevent coverage regressions without blocking CI on the existing codebase. Comments in the config note they should be raised as coverage improves. |
|
@quanticsoul4772 Approved PR. Please merge it after resolving conflicts. Thanks! |
Resolve conflicts with main's parallel coverage commit (76e63f4, PR Evaliphy#40): - vitest.config.ts: keep monorepo-aware config with package aliases and regression-floor thresholds (lines 54, statements 53, branches 44, functions 60) per the approved design on this PR. - .github/workflows/test.yml: keep separate Test and Coverage steps and 30-day artifact retention. - pnpm-lock.yaml: regenerated via pnpm install, verified with --frozen-lockfile. Verified: pnpm run test:coverage passes (102 tests) with coverage above configured thresholds.
|
@priyanshus conflicts resolved in e3c2134. CI |
Summary
Resolves #20.
vitest.config.tsat root with@vitest/coverage-v8provider,text/lcov/htmlreporters, workspace package aliases, and minimum thresholds (60% lines/functions/statements, 50% branches)@vitest/coverage-v8to rootdevDependenciestest:coveragescript (vitest run --coverage)test.ymlGitHub Actions workflow: runtest:coverageaftertest, uploadcoverage/as a 30-day artifactTest plan
pnpm run test:coverageruns without error and emits coverage summarycoverage/directory created withindex.htmlandlcov.info🤖 Generated with Claude Code