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