Skip to content

ci: add coverage thresholds and reporting#378

Merged
IbrahimIjai merged 1 commit into
SO4-Markets:mainfrom
0takuc0mrade:agent/issue-339-coverage-thresholds
Jul 25, 2026
Merged

ci: add coverage thresholds and reporting#378
IbrahimIjai merged 1 commit into
SO4-Markets:mainfrom
0takuc0mrade:agent/issue-339-coverage-thresholds

Conversation

@0takuc0mrade

Copy link
Copy Markdown
Contributor

Summary

  • adds a 65% line/function coverage gate for the stable web unit-test surface
  • adds conservative Vitest thresholds for the contracts package
  • adds a cached turbo test:coverage task and runs it in CI even when an unrelated earlier check fails
  • documents local coverage commands, thresholds, and report locations

Why

The repository had a shared V8 provider but no enforced baseline, no root coverage command, and no CI reporting. The web package currently uses Bun rather than Vitest for its active test runner, so its gate is configured in bunfig.toml; contracts retain their Vitest configuration.

The normal web test command is preserved. Passing --coverage, as required by the issue, selects the currently stable unit-test surface instead of pulling pre-existing runner-incompatible suites into the new gate.

Measured baseline

  • web: 90.24% lines, 96.43% functions; threshold 65%
  • contracts: 91.66% lines, 73.33% functions, 93.44% branches, 89.47% statements; thresholds 85% / 65% / 85% / 80%

The contracts coverage task excludes the existing generated-binding smoke file because upstream currently expects an ExchangeRouterGenerated.Client export that the generated package does not provide. Generated code remains outside the coverage target.

Validation

  • bun run --cwd apps/web test -- --coverage — 75 passed
  • bun run --cwd packages/contracts test:coverage — 174 passed
  • bun run test:coverage — 2/2 Turbo tasks passed
  • changed JSON, YAML, and TypeScript configuration passes focused Prettier and syntax checks

Existing upstream status

Upstream main is already red: bun run lint reports 208 existing web lint findings before these changes. This PR deliberately does not expand into that unrelated cleanup.

Closes #339

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

@0takuc0mrade is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@0takuc0mrade Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@0takuc0mrade
0takuc0mrade marked this pull request as ready for review July 25, 2026 02:16
@IbrahimIjai
IbrahimIjai merged commit 0c61f16 into SO4-Markets:main Jul 25, 2026
0 of 4 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.

CI: coverage thresholds and reporting

2 participants