feat: add Lighthouse CI performance budget enforcement #22

Closed
pook wants to merge 1 commit from feat/lighthouse-ci into master
Owner

Summary

  • Adds npm run lighthouse-ci script that runs Lighthouse audits against built instance HTML files in instances/*/
  • Enforces configurable performance budgets via .lighthouserc.json (Performance >= 90, Accessibility >= 95, Best Practices >= 90, SEO >= 90)
  • Outputs a summary table to stdout showing each category score vs budget, exits with code 1 if any threshold is missed
  • Works in CI without a running server (uses LHCI's staticDistDir to serve files temporarily)

Files changed

  • package.json — new, with lighthouse-ci script and @lhci/cli dev dependency
  • .lighthouserc.json — new, budget thresholds and Lighthouse collect settings
  • scripts/lighthouse-ci.js — new, runner that discovers instances, runs Lighthouse, prints budget report
  • .gitignore — added LHCI temp file patterns
  • package-lock.json — generated lockfile

Test plan

  • Run npm install && npm run lighthouse-ci in an environment with Chrome available
  • Verify summary table prints with PASS/FAIL per category
  • Verify exit code 1 when a score drops below budget
  • Customize .lighthouserc.json budgets and confirm changes are respected

🤖 Generated with Claude Code

## Summary - Adds `npm run lighthouse-ci` script that runs Lighthouse audits against built instance HTML files in `instances/*/` - Enforces configurable performance budgets via `.lighthouserc.json` (Performance >= 90, Accessibility >= 95, Best Practices >= 90, SEO >= 90) - Outputs a summary table to stdout showing each category score vs budget, exits with code 1 if any threshold is missed - Works in CI without a running server (uses LHCI's `staticDistDir` to serve files temporarily) ## Files changed - `package.json` — new, with `lighthouse-ci` script and `@lhci/cli` dev dependency - `.lighthouserc.json` — new, budget thresholds and Lighthouse collect settings - `scripts/lighthouse-ci.js` — new, runner that discovers instances, runs Lighthouse, prints budget report - `.gitignore` — added LHCI temp file patterns - `package-lock.json` — generated lockfile ## Test plan - [ ] Run `npm install && npm run lighthouse-ci` in an environment with Chrome available - [ ] Verify summary table prints with PASS/FAIL per category - [ ] Verify exit code 1 when a score drops below budget - [ ] Customize `.lighthouserc.json` budgets and confirm changes are respected 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat: add Lighthouse CI performance budget enforcement
Some checks failed
agent-worker/pr-tests Running PR tests...
Smoke Test / smoke (push) Has been cancelled
3f60b25983
Add npm script and tooling to run Lighthouse audits against built
instance HTML files and fail if Core Web Vitals scores drop below
configurable thresholds (perf>=90, a11y>=95, bp>=90, seo>=90).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

⚠️ No Test Suite Detected

Commit: 3f60b259

No test script found in package.json. Add a test script to enable automated testing.

## ⚠️ No Test Suite Detected **Commit:** `3f60b259` No `test` script found in `package.json`. Add a test script to enable automated testing.
pook closed this pull request 2026-04-21 20:29:07 -04:00
Some checks failed
agent-worker/pr-tests Running PR tests...
Smoke Test / smoke (push) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/website-template!22
No description provided.