diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..582c510 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +# Quality gate: typecheck + test on every PR and non-main push. +# 0pt previously relied solely on the Vercel build with no pre-merge gate. +# Build is intentionally NOT run here because it needs runtime secrets +# (POSTGRES_URL, ENGINE_URL, STRIPE, RESEND) — Vercel owns the build; CI owns +# the static gate. +# +# Lint is intentionally NOT a step: this repo has no eslint dependency or +# config wired (package.json's "lint" script is `eslint .`, but eslint is not +# in the lockfile), so a lint step fails unconditionally on `command not found` +# and — because a failed step aborts the job — would prevent typecheck/test +# from ever running. Wiring eslint is a separate decision; until then the gate +# is typecheck + the existing vitest suite, both of which pass on a clean tree. +# Python engine (services/api) is gated separately if/when a Python workflow +# is added. +on: + pull_request: + push: + branches-ignore: [main] + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + gate: + name: Typecheck + test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Enable corepack (pnpm) + run: corepack enable + - name: Install (frozen lockfile) + run: pnpm install --frozen-lockfile + - name: Typecheck (tsc --noEmit) + run: pnpm run typecheck + - name: Test (vitest) + run: pnpm run test