Skip to content

CI: run typecheck, lint & Vitest suites on pull requests #33

Description

@nojibe

Problem

The only CI workflow that runs on pull requests is .github/workflows/e2e.yml (Playwright). The core quality gates are never enforced in CI, even though the scripts exist in package.json:

  • pnpm typecheck (tsc --noEmit)
  • pnpm lint (next lint)
  • pnpm test:web
  • pnpm test:cli

This means type errors, lint violations, and unit-test regressions can land on main without any automated check. The repo even ships a pr-check skill that runs exactly these locally — CI should mirror it.

Dependency

Blocked by #45 (migrate Jest → Vitest). This workflow should run the Vitest suites, so the migration should land first. Once #45 merges, the test:web / test:cli scripts will invoke vitest run and this workflow wires straight into them — no change needed here beyond referencing the migrated scripts.

Proposed change

Add a .github/workflows/ci.yml that runs on pull_request and push to main:

  • Checkout + pnpm/action-setup + actions/setup-node (Node version from .nvmrc, cache: pnpm)
  • pnpm install --frozen-lockfile
  • Parallel jobs (or steps): typecheck, lint, test:web, test:cli (all Vitest post-Migrate test suites from Jest to Vitest #45)
  • Use concurrency to cancel superseded runs (mirror e2e.yml)

Acceptance criteria

  • Typecheck, lint, and both Vitest suites run on every PR and block merge on failure
  • Node version sourced from .nvmrc (currently pinned there but not in CI)
  • Reasonable caching so runs stay fast
  • Optionally gate on paths-ignore for docs-only changes, consistent with e2e.yml

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions