From 5e4636e7d3423153790ab7dcd4676af3b1ab6357 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 4 Oct 2026 00:51:11 +0000 Subject: [PATCH] ci: gate pull requests on pnpm lint and typecheck The only workflow was sync-preview, so a PR failing the repo's own validate command merged green. Run the hermetic half of it on every PR and on main. Build stays out of the gate: it fetches the OpenAPI spec from the live preview API. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01KxPqVqiT1VA4Dp3DzexfQy --- .github/workflows/validate.yml | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/validate.yml diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..ec01c43 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,45 @@ +name: Validate + +# The hermetic half of `.claude/csw.json` validate: lint and typecheck. +# `pnpm build` is deliberately left out — it fetches the OpenAPI spec from the +# live preview API, so gating PRs on it would make them depend on preview being up. + +on: + pull_request: + push: + branches: [main] + +concurrency: + group: validate-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + lint-typecheck: + name: lint + typecheck + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Lint + run: pnpm lint + + - name: Typecheck + run: pnpm typecheck