Repository navigation
Report the Lighthouse check under its literal name when its jobs are skipped - #246
Draft
lwwmanning wants to merge 1 commit into
Draft
lwwmanning wants to merge 1 commit into
lwwmanning wants to merge 1 commit into
Conversation
…skipped The `report` job's name was an expression. GitHub evaluates a job's name only when the job runs, so on a fork PR, where the audits are skipped, the check reported under the unevaluated text, and the ruleset waited for "Lighthouse and axe" forever (#243). The job now has the literal name and runs on every pull request. It passes a PR whose audits were all skipped because it gets no secrets, and fails any other skip or failure. The Lighthouse matrix moves to the reusable lighthouse-audit.yml, and the baseline to lighthouse-baseline.yml, so no baseline run has a job by the required name: a skipped job still reports a check, and a skipped required check passes. tests/unit/required-checks.test.ts asserts that each check the ruleset requires of a workflow is a literal job name. Signed-off-by: Will Manning <will@willmanning.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔦 Lighthouse audit
Run |
This branch was successfully deployed
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.
This changes the Lighthouse workflow's required check,
Lighthouse and axe, and how a manual baseline runs. The audits themselves, axe, the floors inlighthouserc.cjs, and the PR comment are unchanged.Before, the
reportjob's name was an expression that chose betweenLighthouse baselineandLighthouse and axe. GitHub evaluates a job's name only when the job runs. On a fork PR the audits are skipped, so the job was skipped too, and its check reported under the unevaluated text. The ruleset waited forLighthouse and axeforever, which is what held #243. After, the job has the literal name and runs on every pull request. It passes a PR whose audits were all skipped because it gets no secrets, and fails any other skip or failure.The Lighthouse matrix moves to the reusable
lighthouse-audit.yml, whichlighthouse.ymlcalls on a PR and the newlighthouse-baseline.ymlcalls on a manual run. The baseline is a separate workflow so that no run of it has a job namedLighthouse and axe. A skipped job still reports a check under its name, and a skipped required check passes. Run a baseline withgh workflow run lighthouse-baseline.yml --ref <branch>.tests/unit/required-checks.test.tsreads the workflows and asserts that each check the ruleset requires of a workflow is a literal job name. Its list mirrors the ruleset, so change both together. CLAUDE.md records the rule.🤖 Generated with Claude Code