ci: Lighthouse CI budgets on PRs — perf / a11y / SEO / best-practices (closes #13)#25
Merged
Conversation
A public single-page showcase site with no perf / a11y / SEO checks — oversized images, broken meta/OG tags, contrast issues, or render-blocking assets could ship silently. - lighthouse.yml: on every PR, build the site and run Lighthouse CI over the static public/ (Hugo built with baseURL "/" so the root-relative, fully self-contained output serves locally). Reports stored as a GitHub artifact — no third-party upload, in keeping with the site's zero-third-party ethos. - lighthouserc.json: category assertions for performance (0.90), accessibility (0.95), SEO (0.95), best-practices (0.95) — set to "warn" to start so the first runs record a baseline; ratchet to hard "error" floors once known. Verified locally: production build is root-relative and self-contained (LHCI-servable); prettier/JSON/YAML/zizmor clean. The Lighthouse job runs on this PR, so its scores are the recorded baseline. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…fix) zizmor's online ref-version-mismatch audit (not run in the local --no-online pass) flagged the '# v12.6.2' comment — treosh/lighthouse-ci-action tags have no 'v' prefix. SHA unchanged; comment corrected to '# 12.6.2'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #13. A public single-page showcase site with no perf / a11y / SEO checks — oversized images, broken meta/OG tags, contrast issues, or render-blocking assets could ship silently.
What this adds
.github/workflows/lighthouse.yml— on every PR, builds the site and runs Lighthouse CI over the staticpublic/. Built with--baseURL "/"so the root-relative, fully self-contained output (CSS/JS inlined-by-hash, zero third-party requests) serves locally for LHCI. Reports are stored as a GitHub artifact — no third-party upload, in keeping with the site's zero-third-party ethos.lighthouserc.json— category assertions: performance ≥ 0.90, accessibility ≥ 0.95, SEO ≥ 0.95, best-practices ≥ 0.95,numberOfRuns: 3.Thresholds start as warnings
Per the issue, assertions are set to
warn(non-blocking) so the first runs record a baseline; once the real numbers are known they can be ratcheted to harderrorfloors just under baseline so regressions fail. This PR's own Lighthouse run is the baseline — see the job output / artifact.Acceptance (#13)
lighthouserc.jsonwith documented category thresholdsVerified locally
🤖 Generated with Claude Code