CI templates
Automate lint, build, and E2E checks so extension changes stay releasable.
Use CI to run the same quality gates on every pull request and release branch.
CI capabilities
Core pipeline stages
- install dependencies
- run lint/check commands
- build browser targets
- run automated tests (including Playwright where applicable)
- upload artifacts/reports
Minimal GitHub Actions example
Build matrix example
Playwright in CI
- install browsers in CI job (
playwright installor equivalent) - keep retries slightly higher on CI than local
- publish Playwright reports/artifacts for failed runs
- use
dist/extension-js/<browser>/ready.jsonas readiness contract before launching Playwright - avoid parsing human-readable logs in CI automation scripts
- prefer native readiness gates:
extension dev --wait --browser=<browser>(watch/dev) orextension start --wait --browser=<browser>(production/start) - for machine consumers, prefer
--wait-format=json
Example readiness gate
Common pitfalls
- CI scripts diverging from local scripts over time
- building only one browser target while shipping to multiple engines
- missing artifact upload for failed E2E jobs
- mixing unpinned Node/package manager versions across workflows
This repository includes an E2E workflow example at:
.github/workflows/e2e.yml
Best practices
- Keep CI commands close to local scripts to reduce drift.
- Fail fast on lint/config errors before expensive browser jobs.
- Cache dependencies and browser binaries when possible.
- Version lock CI Node and package manager versions for reproducibility.
Next steps
- Add or refine Playwright E2E tests.
- Review commands reference for script alignment.
