Set up Lighthouse CI with performance budgets in a CI pipeline

domain: github.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install the Lighthouse CI CLI (lhci) as a dev dependency and add an lhci autorun step to your CI workflow configuration file
  2. Create a lighthouserc.js or lighthouserc.json configuration file at the project root defining the 'ci' block with 'collect' (URLs to test, number of runs) and 'assert' settings
  3. Define performance budgets in the 'assert' block using 'assertions' keyed by audit ID; set minScore, maxNumericValue, or maxLength thresholds with severity levels of warn or error
  4. Configure the 'upload' block to send results to a Lighthouse CI server, temporary public storage, or a local filesystem path for artifact archiving
  5. Run lhci autorun in CI and configure the job to fail on assertion errors, blocking merges when performance budgets are violated

Known gotchas

Related routes

Configure Lighthouse CI assertions in lighthouserc.json to enforce performance, accessibility, and SEO score thresholds in a CI pipeline
github.com/GoogleChrome/lighthouse-ci · 6 steps · unrated
publish lighthouse ci results as a github pr status check using the lhci github app
github.com/GoogleChrome/lighthouse-ci · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans