Overview
Add a GitHub Actions CI workflow to automatically validate code quality on every push and pull request to main.
What to implement
Create .github/workflows/ci.yml that runs the following steps in order:
- Checkout —
actions/checkout@v4
- Setup Node —
actions/setup-node@v4 with Node 24 and npm cache
- Install —
npm ci
- Typecheck —
npm run typecheck
- Lint —
npm run lint
- Test —
npm test
- Build —
npm run build
Notes
- Use Node 24 (not 20 or 22). The project uses WXT which depends on packages that require
>=22.13.0, and the package-lock.json was generated with npm 11 (ships with Node 24). Using an older Node version causes npm ci to fail due to lock file inconsistencies with optional platform-specific packages (@emnapi/core, @emnapi/runtime).
- The project uses Vite 6 (not 5). WXT 0.20.x uses the
filter object syntax in Vite plugin hooks which is a Vite 6 feature — wxt prepare silently breaks with Vite 5.
- Trigger on
push and pull_request targeting main.
Acceptance criteria
Overview
Add a GitHub Actions CI workflow to automatically validate code quality on every push and pull request to
main.What to implement
Create
.github/workflows/ci.ymlthat runs the following steps in order:actions/checkout@v4actions/setup-node@v4with Node 24 and npm cachenpm cinpm run typechecknpm run lintnpm testnpm run buildNotes
>=22.13.0, and thepackage-lock.jsonwas generated with npm 11 (ships with Node 24). Using an older Node version causesnpm cito fail due to lock file inconsistencies with optional platform-specific packages (@emnapi/core,@emnapi/runtime).filterobject syntax in Vite plugin hooks which is a Vite 6 feature —wxt preparesilently breaks with Vite 5.pushandpull_requesttargetingmain.Acceptance criteria
main