From edcc4973d337b401d150f3c33e488c8df90b87fd Mon Sep 17 00:00:00 2001 From: Tom McKenzie Date: Mon, 1 Jun 2026 11:19:43 +1000 Subject: [PATCH] ci: add GitHub Actions workflow (typecheck, test, build) Single job on push/PR to main running the existing npm scripts on Node 24. Tests run inside workerd via vitest-pool-workers, so no Cloudflare secrets are needed. checkout@v6 / setup-node@v6 (current majors). npm cache enabled explicitly since there is no packageManager field. Least-privilege perms and cancel-in-progress concurrency. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) 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..8fffb4e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +# Cancel superseded runs on the same ref (e.g. rapid pushes to a PR). +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + build: + name: typecheck · test · build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-node@v6 + with: + node-version: 24 + cache: npm + + - name: Install dependencies + run: npm ci + + # Tests run inside workerd via @cloudflare/vitest-pool-workers; the pool + # provisions miniflare/workerd itself, so no Cloudflare account or + # secrets are required here. + - name: Typecheck + run: npm run typecheck + + - name: Test + run: npm test + + - name: Build + run: npm run build