← knowledge.oriz.in

Lighthouse CI

service a11yaccessibilitylighthouseciperfprimary

Lighthouse CI

Role

Lab-grade scoring tool — runs Google Lighthouse on the PR preview URL and reports the four pillars: Accessibility, Performance, Best Practices, SEO. Posted as a comment on every PR. Sits alongside axe-core and Pa11y as the three-tool a11y stack; its perf score also complements Vercel Speed Insights RUM (lab vs real-user).

Free tier

Card / subscription required?

NO. OSS, runs in the existing GitHub Actions runner.

How CI consumes it

- name: Lighthouse CI
  uses: treosh/lighthouse-ci-action@v11
  with:
    urls: |
      ${{ env.PREVIEW_URL }}
      ${{ env.PREVIEW_URL }}/about
    uploadArtifacts: true
    temporaryPublicStorage: true
    configPath: ./lighthouserc.json
// lighthouserc.json
{
  "ci": {
    "assert": {
      "assertions": {
        "categories:accessibility": ["error", { "minScore": 1.0 }],
        "categories:performance":   ["error", { "minScore": 0.9 }],
        "categories:best-practices":["error", { "minScore": 0.95 }],
        "categories:seo":           ["error", { "minScore": 1.0 }]
      }
    }
  }
}

A11y category is set to require 100 (1.0) — any violation fails the PR.

What it catches (beyond axe + Pa11y)

Alternatives

Swap cost

Low — Lighthouse is the underlying tool everyone runs. Dropping the treosh action and running @lhci/cli directly is a one-line change.

Why this is our pick

Free, OSS, posts the score directly as a PR comment so reviewers see deltas at a glance. Rounds out the three-tool a11y stack with a score view (axe + Pa11y give violations only). Its perf score also gives us a lab snapshot per PR — Speed Insights gives the real-user picture once shipped.

Cross-refs