Lighthouse CI is a set of commands that make continuously running, asserting, saving, and retrieving Lighthouse results as easy as possible.
The node CLI (npm install -g @lhci/cli
) runs Lighthouse, asserts results, and uploads reports.
The node server (npm install @lhci/server
) stores results, compares reports, and displays historical results with a dashboard UI.
- Get a Lighthouse report alongside every PR.
- Prevent regressions in accessibility, SEO, offline support, and performance best practices.
- Track performance metrics and Lighthouse scores over time.
- Set and keep performance budgets on scripts and images.
- Run Lighthouse many times to reduce variance.
- Compare two versions of your site to find improvements and regressions of individual resources.
- Getting Started
- Troubleshooting / FAQs
- CLI Documentation
- Assertions Documentation
- Server Documentation
- Versioning Policy
.travis.yml
language: node_js
addons:
chrome: stable
before_install:
- npm install -g @lhci/cli@0.3.x
script:
- npm run build # build your site
- lhci autorun # run lighthouse CI
-
Lighthouse CI GitHub Action - Automatically run Lighthouse CI on every PR with GitHub Actions, no infrastructure required.
-
Lighthouse CI Starter Example - A minimal example repo that you can use as a template when starting from scratch, offers a beginner-friendly quickstart guide using create-react-app.
A collection of unofficial blog posts, tutorials, and guides written by the community on using Lighthouse CI.
NOTE: This is not official documentation. You're encouraged to familiarize yourself with Lighthouse CI and read through Getting Started before continuing.
- Integrate Lighthouse CI for static website generator - An article on integrating Lighthouse CI with static website generators like Gatsby, Jekyll, etc.