-
Notifications
You must be signed in to change notification settings - Fork 0
ci(lighthouse): make the budget gate self-healing and scope it to perf-relevant diffs #1722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3d425e1
ci(lighthouse): make the budget gate self-healing and scope it to per…
BigSimmo 22d7a90
Merge branch 'main' into claude/lighthouse-ci-smart-gate
BigSimmo 44456f7
Merge branch 'main' into claude/lighthouse-ci-smart-gate
BigSimmo b3fd373
fix(ci): close Lighthouse perf-scope holes from review
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Setup pinned Chromium for Lighthouse | ||
| description: > | ||
| Install Playwright's managed Chromium and export PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH, so every | ||
| Lighthouse job in this repository measures with the same browser build for a given commit. | ||
|
|
||
| # The Lighthouse budget used to drive whatever Chrome ships in the ubuntu-24.04 runner image | ||
| # (matching live-web-vitals.yml, which measures a live domain and isn't graded against a | ||
| # committed baseline). That ambient browser is NOT pinned per commit — the runner fleet was | ||
| # observed serving HeadlessChrome/150 and /151 to jobs minutes apart on 2026-08-07 — so the | ||
| # baseline comparator treated the version drift as "evidence incomplete" and failed closed | ||
| # (by design: a browser bump is otherwise indistinguishable from a real regression). | ||
| # Refreshing the baseline for whichever version showed up bought a few hours before the next | ||
| # mismatched runner failed it again (#1690). | ||
| # | ||
| # Pin Playwright's own managed Chromium instead, the same binary the Production UI / Visual | ||
| # baselines jobs already use, cached by lockfile hash so it is identical across every runner | ||
| # for a given commit. run-lighthouse-budget.mjs already honours | ||
| # CHROME_PATH/PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH. | ||
| # | ||
| # This lives in a composite action rather than being duplicated per job for one reason: the | ||
| # measuring job and the baseline-refresh job MUST resolve the same executable. If they drift, | ||
| # the refreshed baseline records a browser other than the one that will grade against it, and | ||
| # the gate goes permanently red again — exactly the failure this action exists to end. | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Restore Chromium browser cache | ||
| id: pw-cache | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6 | ||
| with: | ||
| path: ~/.cache/ms-playwright | ||
| key: playwright-chromium-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | ||
| restore-keys: | | ||
| playwright-chromium-${{ runner.os }}- | ||
|
|
||
| - name: Install Chromium | ||
| shell: bash | ||
| run: | | ||
| if [ "${{ steps.pw-cache.outputs.cache-hit }}" = "true" ]; then | ||
| npx playwright install-deps chromium | ||
| npx playwright install chromium | ||
| else | ||
| npx playwright install --with-deps chromium | ||
| fi | ||
|
|
||
| - name: Pin the Chromium executable path | ||
| shell: bash | ||
| run: echo "PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=$(node -e "console.log(require('playwright').chromium.executablePath())")" >> "$GITHUB_ENV" |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.