Repository navigation
ci: hold the page to its Lighthouse budget - #18
Merged
Merged
Conversation
Nothing protected the Lighthouse scores: a change could take the hero back behind a script or three.js back onto the main thread and CI would stay green. scripts/lighthouse.mjs serves dist/ with Astro's preview server, audits the page on the mobile default and the desktop preset, takes the median of three runs and fails under the budget: 95 in performance, with a little slack for the runner, and 100 in accessibility, best practices and SEO. It prints the scores with LCP, TBT and CLS, names the weighted audits that cost the points, writes the GitHub step summary, and keeps the HTML and JSON reports in lighthouse-reports/. The Cloudflare beacon is blocked during the audit, so an offline run or a third party's outage never counts against the page. CI runs it in its own job, in parallel with Build, so a slow runner cannot hide a type error, and uploads the reports whatever the outcome. Locally, `pnpm build && pnpm lighthouse` does the same; `--runs=1` for a quick look. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
bounda-website | f87a29b | Oct 30 2026, 10:34 PM |
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.
Summary
A Lighthouse job in CI, so the 100 from #17 cannot regress unnoticed.
scripts/lighthouse.mjsservesdist/with Astro's preview server, audits the page on the mobile default and the desktop preset, takes the median of three runs and fails under the budget: 95 in performance (slack for the runner) and 100 in accessibility, best practices and SEO. It names the weighted audits that cost the points, writes the step summary and keeps HTML and JSON reports inlighthouse-reports/.pnpm build && pnpm lighthouseruns the same check locally;--runs=1for a quick look.lighthouseis a pinned devDependency;actions/upload-artifactis pinned by SHA like the other actions.Verification
pnpm lighthouseon currentmain: 100 in every category on both presets, median of three, 70 s.dist/index.html) takes mobile performance to 73 and the script exits 1.pnpm checkpasses.