GoogleChrome / lighthouse-ci

Automate running Lighthouse for every commit, viewing the changes, and preventing regressions
Apache License 2.0
6.45k stars 651 forks source link
lighthouse webperf

Lighthouse CI

Overview

Lighthouse CI is a suite of tools that make continuously running, saving, retrieving, and asserting against Lighthouse results as easy as possible.

Quick Start

To get started with GitHub actions for common project configurations, add the following file to your GitHub repository. Follow the Getting Started guide for a more complete walkthrough and instructions on other providers and setups.

.github/workflows/ci.yml

name: CI
on: [push]
jobs:
  lighthouseci:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 18
      - run: npm install && npm install -g @lhci/cli@0.14.x
      - run: npm run build
      - run: lhci autorun

Features

<img src="https://user-images.githubusercontent.com/2301202/70814696-a4c41a00-1d91-11ea-9ed9-77811939c244.png" alt="Screenshot of the Lighthouse CI github app UI" width="48.5%"> <img src="https://user-images.githubusercontent.com/2301202/79480502-c8af9a80-7fd3-11ea-8087-52f6c8ba6f03.png" alt="Screenshot of the Lighthouse CI server dashboard UI" width="47%"> <img src="https://user-images.githubusercontent.com/2301202/70814842-ef459680-1d91-11ea-8b55-bb5d44eeb969.png" alt="Screenshot of the Lighthouse CI assertion output" width="48%"> <img src="https://user-images.githubusercontent.com/2301202/70814650-85c58800-1d91-11ea-925e-af9d03f1b20d.png" alt="Screenshot of the Lighthouse CI server diff UI" width="48%">

Documentation

If you're already familiar with continuous integration and have an existing process, start with Getting Started.

If you're not familiar with continuous integration, start with Introduction to CI.

Related Community Projects

A collection of projects using Lighthouse CI written by the community. If you're using Lighthouse CI in your open source project, open a PR to add it here!

Community Guides

A collection of unofficial blog posts, tutorials, and guides written by the community on using Lighthouse CI. If you've written up a guide to using Lighthouse CI in your project, open a PR to add it here!

NOTE: This is not official documentation. You're encouraged to familiarize yourself with Lighthouse CI and read through Getting Started before continuing.

Contributing

We welcome contributions to lighthouse-ci! Read our contributing guide to get started.