From a46565da69afd510fa9136d556a3718aac84d8ac Mon Sep 17 00:00:00 2001 From: drogers0 Date: Tue, 30 Jun 2026 20:05:54 -0500 Subject: [PATCH] ci: add GitHub Actions workflow (lint, typecheck, test, build) Runs the four local gates from CLAUDE.md on every pull request and on pushes to master: eslint, tsc (both tsconfigs), vitest, and the full Vite build (asserting dist/manifest.json is produced). Single ubuntu job on Node 22 with npm cache and npm ci; concurrency cancels superseded PR runs; least-privilege read-only token. Unit tests run in Node with no DOM/service-worker/live Fidelity, so CI is a floor, not a replacement for the in-Chrome manual verification CLAUDE.md requires. --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 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..95ac022 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +on: + pull_request: + push: + branches: [master] + workflow_dispatch: + +# Least privilege: the job only needs to read the repo. +permissions: + contents: read + +# Cancel a PR's in-progress run when a new commit is pushed to the same ref. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + verify: + name: verify + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '22' + cache: npm + + - name: Install dependencies + run: npm ci + + # Ordered cheap → expensive for fast feedback. These mirror the local gates in CLAUDE.md. + - name: Lint + run: npm run lint + + - name: Typecheck + run: npm run typecheck + + - name: Test + run: npm run test + + - name: Build + run: npm run build + + # Fail loudly if the manifest copy step didn't produce a loadable extension. + - name: Verify build output + run: test -f dist/manifest.json