CI/CD

NextGenKit includes a GitHub Actions workflow at .github/workflows/ci.yml.

What It Does

On every push and pull request:

  1. Typecheckpnpm typecheck
  2. Lintpnpm lint
  3. Unit Testspnpm test

The Workflow

name: CI
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  ci:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: pnpm
      - run: pnpm install --frozen-lockfile
      - run: pnpm typecheck
      - run: pnpm lint
      - run: pnpm test

Adding E2E Tests

To add Playwright E2E tests to CI, you'll need to:

  1. Add a test database (e.g., Neon branch or local PG in CI)
  2. Set environment variables as GitHub Secrets
  3. Add a step: pnpm test:e2e

Pre-commit Checks

Run locally before pushing:

pnpm typecheck && pnpm lint && pnpm test