Repository navigation
ci: add the shared nightly Lighthouse workflow - #4
Merged
Merged
Conversation
A reusable workflow that audits a repository's site only when its branch moved since the last audit, plus a self-test that calls it against a fixture page on each pull request that changes it. Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
alexgrozav
marked this pull request as ready for review
November 25, 2026 21:56
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.
What changed and why
Five repositories each run Lighthouse their own way, on every pull request, and nothing shared schedules it or checks whether anything changed. This adds a reusable workflow that a repository calls on a nightly schedule, and that audits only when the branch moved since the last audit.
.github/workflows/lighthouse.yml(workflow_call) has two jobs:Changes(actions: read) finds the caller's workflow, walks back through its completed runs on the same branch, newest first, to the last one whoseAuditjob passed, failed or timed out, and decides. A scheduled run skips only when the branch is still at that run's commit. Every other event audits. A failed lookup fails the run. The decision and its reason go to the job summary.Audit(contents: read) installs, builds and runs the caller's audit command, each from an environment variable asrelease.ymldoes, then uploads the reports aslighthouse-reportsfor 14 days, after a failed audit too..github/workflows/lighthouse-test.ymlcalls this branch's own copy on each pull request that changes it, against a fixture page intest/lighthouse/that must score 0.9 in every category. It passes no install and explicit Node.js and pnpm versions, since this repository has nopackage.jsonor.node-version.README.mddocuments the workflow, the caller's file, its inputs, the permissions, how the change check decides and the self-test.Actions are pinned to the same SHAs as
release.yml, andupload-artifactto the one the callers'ci.ymlfiles pin. Nothing calls the workflow yet, so merging it changes no other repository.How it was checked
actionlint .github/workflows/lighthouse.yml .github/workflows/lighthouse-test.ymlexits 0, with shellcheck on therun:scripts.pnpm dlx prettier@3 --check .passes.pnpm dlx @lhci/cli@0.16.1 autorun --config=test/lighthouse/lighthouserc.jsonscores 1 in every category locally.Lighthouse self-testpasses on this pull request:ChangesandAuditsucceed on both pushes, and each run uploadslighthouse-reportswith thelhr-*.jsonreports.Checklist
fix(button): keep focus after submit..changeset/folder, this pull request adds a changeset.