Skip to content

👷 ci: add lint, types and coverage gates to PR workflow - #671

Merged
futjesus merged 1 commit into
mainfrom
ci/pr-checks-and-coverage
Jul 27, 2026
Merged

👷 ci: add lint, types and coverage gates to PR workflow#671
futjesus merged 1 commit into
mainfrom
ci/pr-checks-and-coverage

Conversation

@futjesus

Copy link
Copy Markdown
Member

Summary

Second PR of the audit series, stacked on #670 (its coverage excludes feed the threshold values here). Until now, PR CI ran only vitest run — lint, type errors and formatting were caught only by the local (bypassable) husky hook.

Changes

  • tests.yml: adds Lint, Type check and Prettier check steps, and switches the test step to npm run test (vitest with coverage) — the exact mirror of the pre-commit hook, now enforced server-side. The ci script was deliberately left untouched: the release workflow depends on its current semantics.
  • Coverage thresholds in vitest.config.ts as a regression ratchet, set 1–2 points below the measured post-exclusion values (64.95% stmts / 58.31% branch / 61.66% funcs / 65.57% lines → floors 63/56/60/64). These apply to local npm run test and the pre-commit hook too.
  • storybook-check.yml: new workflow that builds Storybook on PRs touching lib/**, .storybook/** or the package manifests. Today a broken Storybook build is only discovered at deploy time (post-publish). Note: not intended as a required check — path-filtered runs show as skipped.

Testing

  • npx vitest run --coverage passes with the new thresholds.
  • Full npm run ci green locally.

Base automatically changed from fix/quick-wins to main July 27, 2026 14:44
- tests.yml now runs lint, check:types, check:prettier and tests with
  coverage instead of only vitest run
- Enforce coverage thresholds (63/56/60/64) as a ratchet floor, measured
  against current coverage after excluding auto-generated icon assets
- New storybook-check.yml builds Storybook on PRs touching lib, .storybook
  or the package manifests, so a broken Storybook is caught before deploy
@futjesus
futjesus force-pushed the ci/pr-checks-and-coverage branch from 9c8f505 to 1d5e16b Compare July 27, 2026 14:52
@futjesus
futjesus merged commit f2e045d into main Jul 27, 2026
1 check passed
@futjesus
futjesus deleted the ci/pr-checks-and-coverage branch July 27, 2026 14:55
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