Automated Lighthouse Checks
Add the Lighthouse CI GitHub Action, set performance and accessibility score thresholds, and block merges that regress Core Web Vitals.
Why Automate Lighthouse?
Manual Lighthouse runs catch performance regressions late — usually after a real user complains. Automated Lighthouse CI runs on every PR, fails builds that regress key metrics, and trends scores over time. Treat performance like a test suite.
Lighthouse CI
The open-source Lighthouse CI (lhci) toolset by Google: runs Lighthouse multiple times, takes the median, asserts against thresholds, and uploads results.
npm install -D @lhci/cli
# Run locally:
npx lhci autorun