Problem
There are no automated performance, accessibility, or SEO checks. Regressions in page load speed, a11y compliance, or SEO metadata go undetected until users report them.
Scope of Work
Add Lighthouse CI to the CI pipeline
Use treosh/lighthouse-ci-action to run Lighthouse against the built dist/ directory.
Setup:
- After the
npm run build step, serve dist/ locally (e.g., with npx serve dist -l 8080 &)
- Run Lighthouse CI against
http://localhost:8080
- Configure thresholds in a
lighthouserc.json or inline
Suggested initial thresholds (lenient, ratchet up over time):
{
"ci": {
"assert": {
"assertions": {
"categories:performance": ["warn", { "minScore": 0.8 }],
"categories:accessibility": ["error", { "minScore": 0.9 }],
"categories:best-practices": ["warn", { "minScore": 0.8 }],
"categories:seo": ["warn", { "minScore": 0.9 }]
}
}
}
}
Pages to test: At minimum, / (home) and /blog (listing).
Acceptance Criteria
Problem
There are no automated performance, accessibility, or SEO checks. Regressions in page load speed, a11y compliance, or SEO metadata go undetected until users report them.
Scope of Work
Add Lighthouse CI to the CI pipeline
Use
treosh/lighthouse-ci-actionto run Lighthouse against the builtdist/directory.Setup:
npm run buildstep, servedist/locally (e.g., withnpx serve dist -l 8080 &)http://localhost:8080lighthouserc.jsonor inlineSuggested initial thresholds (lenient, ratchet up over time):
{ "ci": { "assert": { "assertions": { "categories:performance": ["warn", { "minScore": 0.8 }], "categories:accessibility": ["error", { "minScore": 0.9 }], "categories:best-practices": ["warn", { "minScore": 0.8 }], "categories:seo": ["warn", { "minScore": 0.9 }] } } } }Pages to test: At minimum,
/(home) and/blog(listing).Acceptance Criteria
errorlevel) block the build