From e11c0b05f805b597e41b66243aa6f71914b0a69b Mon Sep 17 00:00:00 2001 From: Ben Senescu <44480372+bensenescu@users.noreply.github.com> Date: Wed, 11 Mar 2026 11:57:28 -0400 Subject: [PATCH] ci: run pnpm ci in GitHub Actions (#16) * ci: run pnpm ci in GitHub Actions * ci: pin pnpm version in workflow * ci: use ci:check script in workflow * ci: run PR checks on head sha --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 39 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..8739767 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + ci: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run CI checks + run: pnpm run ci:check diff --git a/package.json b/package.json index b29b628..386c506 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "db:migrate:local": "wrangler d1 migrations apply DB --local", "db:migrate:prod": "wrangler d1 migrations apply DB --remote", "knip": "knip", - "ci": "prettier --check . && knip && tsc --noEmit && oxlint . --type-aware" + "ci:check": "prettier --check . && knip && tsc --noEmit && oxlint . --type-aware" }, "cloudflare": { "bindings": {