Fix intermittent Lighthouse failures and scope to changed pages#1333
Conversation
…12702) Chain Lighthouse after validate via workflow_run instead of polling, audit PR-changed site pages by default, and keep depth dispatch and lighthouse:full for thorough runs.
workflow_run only runs from the default branch, so trigger Lighthouse via workflow_dispatch from validate on the PR branch instead.
Lighthouse check results✓ INFO: No site pages to audit in this PR. Commit SHA: c82745b |
1 similar comment
Lighthouse check results✓ INFO: No site pages to audit in this PR. Commit SHA: c82745b |
Exercises the changed-files path on PR 1333 — Lighthouse should audit developer/how-to/test-sandbox.html only.
Lighthouse check results✓ INFO: No site pages to audit in this PR. Commit SHA: 4459f46 |
Use ':(top)site/' to anchor the pathspec at the repo root regardless of where the script is invoked from. The workflow runs it from site/scripts/, which previously caused git diff to return zero files.
PR SummaryThis PR introduces significant improvements to the Lighthouse audit process for PR preview sites. The changes include:
Test Suggestions
|
Validate docs site✓ INFO: A live preview of the docs site is available — Open the preview |
Pull Request Description
What and why?
Fixes sc-12702.
This updates Lighthouse CI so it:
site/pages by default instead of the same root pages on every PR.workflow_dispatch(mode: depth, depth 0–2) and thelighthouse:fulllabel.How to test
For this PR:
site/**/*.qmdfile changes.nrichers/sc-12702/fix-intermittent-lighthouse-failpr_number: 1333mode: changeddepth: 0For broader coverage, add
lighthouse:fullor run manualmode: depth.What was tested
No site pages to audit in this PR.workflow_dispatchconfirmed the Lighthouse workflow can run from the PR branch..qmdchange correctly caused Lighthouse to audit onlydeveloper/how-to/test-sandbox.html.0.88across 3 runs, confirming the new< 0.9failure path works.Lighthouse run: https://github.com/validmind/documentation/actions/runs/26069380803 [expected failure: pre-existing
test-sandbox.htmlaccessibility score of0.88confirms the new< 0.9fail path]Report: https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1779152057612-6670.report.html
The
0.88result appears to be a pre-existing page issue, likely related to the embedded sandbox iframe, not a regression from this PR.What needs special review?
lighthouse-check.yamlafter preview deploy.workflow_dispatch.site/scripts/lighthouse_urls.pymapping changed files to preview URLs.Dependencies, breaking changes, and deployment notes
CI-only change. No production deployment.
Release notes
Internal CI improvement — no user-facing release notes.