Feature/vercel preview performance check - #179
Open
crispy101 wants to merge 13 commits into
Open
Conversation
Adds an opt-in Lighthouse check that measures Core Web Vitals against the preview deployment and comments the median results on the pull request. The check is off by default and runs only when `performance-check` is true and `measured-paths` is non-empty, so existing callers are unaffected. The change is purely additive: no existing line is modified, and the deploy job gains only an `outputs.url` so the new job can consume the preview URL. The caller supplies the measured paths and a Lighthouse CI config holding run count and budgets. Documented with a worked example, including why the config should set `aggregationMethod: median` (LHCI defaults to `optimistic`, which takes the best run) and why the budgets should be advisory on a cold preview. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The secret was named in the inputs table and the example, but nothing said where to obtain it, how to tell whether a project needs it, or what happens without it. Someone hitting a 401 during warm-up had no path from the error to the fix. Adds a Deployment Protection section covering how to generate the secret, the permissions required, the redeploy caveat when rotating it, and how to check whether a project has protection enabled. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The check was an input on the deploy workflow, which meant it could only ever measure a deployment that workflow made, and its cadence was fixed by whatever triggered the deploy. As a separate workflow taking a deployment URL, the caller decides what to measure and when: pair it with a deploy via `needs` on pull requests, call it again on push to the default branch to record a baseline, or point it at a second project. None of that is expressible as an input. vercel-preview.yml goes back to deploying only, losing six inputs and one secret. The two baseline booleans collapse into a `baseline-mode` enum, so the invalid "record and compare" combination is no longer representable. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Baseline caches were keyed only by form factor, so a repository measuring two deployments would have them overwrite each other and pull requests would compare against whichever recorded last. A `baseline-key` input now namespaces them; it defaults to "default", so existing single-deployment callers are unaffected. Adds vercel-performance-keepalive.yml. GitHub evicts a cache that has not been read for 7 days, and the baseline is only rewritten on a merge, so a quiet fortnight would drop it silently. Reading a cache resets that clock, so the workflow restores the baselines and does nothing else, costing seconds rather than the minutes a re-measurement would. It expands the caller's baseline keys across the form factors this repository measures, so callers do not duplicate that list. A full restore is used rather than `lookup-only`, because whether a metadata-only lookup resets the eviction clock is not documented, and the payload is a few hundred bytes either way. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploying several projects from one workflow had them share a group, so cancel-in-progress made each call cancel the previous one.
The group used deployment-url, but that is only known once the deploy the call depends on has finished, while the group is evaluated when the call is queued. Every caller therefore shared an empty group and cancelled each other.
The deploy job set an output, but a reusable workflow only exposes what it declares in on.workflow_call.outputs, so callers always read an empty string.
crispy101
requested review from
AdamJHall,
aaronmedina-dev and
tmthrgd-aligent
August 26, 2026 04:59
Two deployments measured in one pull request shared a comment marker, so whichever finished last overwrote the other's results.
…w-performance-check # Conflicts: # .github/workflows/vercel-preview.yml # docs/vercel-preview.md
actions/cache was tag-pinned, which the blanket policy rejects. setup-node was hash-pinned to an unrelated Dependabot commit rather than to v6.0.0, and the lighthouse-ci-action comment named a v12.6.1 tag that does not exist. Both now use the versions already referenced elsewhere in this repo.
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.
Description of the proposed changes
add workflows for:
Screenshots (if applicable)
Other solutions considered (if any)
Notes to PR author
Notes to reviewers
ℹ️ When you've finished leaving feedback, please add a final comment to the PR tagging the author, letting them know that you have finished leaving feedback
Time Tracking
ABC-xxx: code review, select project XXXX