From 0fbef70963a4129332ab8642b33bd43c4fefb333 Mon Sep 17 00:00:00 2001 From: Logan Kuzyk Date: Sun, 2 Aug 2026 12:13:39 -0700 Subject: [PATCH 1/2] ci: add GitHub Actions lint + typecheck workflow Adds a CI workflow that runs on PRs and pushes to main, plus a typecheck script (tsc --noEmit) to pair with the existing lint script. Lays the groundwork for required status checks on main. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..072e302 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + pull_request: + branches: [main] + push: + branches: [main] + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - run: npm ci + - run: npm run lint + + typecheck: + name: Typecheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - run: npm ci + - run: npm run typecheck diff --git a/package.json b/package.json index 8390cf7..e3e269a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "start": "cross-env NODE_OPTIONS=--no-deprecation next start", "test": "npm run test:int && npm run test:e2e", "test:e2e": "cross-env NODE_OPTIONS=\"--no-deprecation --import=tsx/esm\" playwright test --config=playwright.config.ts", - "test:int": "cross-env NODE_OPTIONS=--no-deprecation vitest run --config ./vitest.config.mts" + "test:int": "cross-env NODE_OPTIONS=--no-deprecation vitest run --config ./vitest.config.mts", + "typecheck": "tsc --noEmit" }, "dependencies": { "@payloadcms/admin-bar": "3.76.1", From b28a24b1a8b80a4d7c3ea5078ea8e584460f5cdc Mon Sep 17 00:00:00 2001 From: Logan Kuzyk Date: Sun, 2 Aug 2026 12:17:39 -0700 Subject: [PATCH 2/2] ci: generate payload importmap before typecheck tsc needs src/app/(payload)/admin/importMap.js, which is gitignored and generated by the payload CLI, so CI must produce it first. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 072e302..0be5575 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,4 +33,5 @@ jobs: node-version: 20 cache: npm - run: npm ci + - run: npm run generate:importmap - run: npm run typecheck