ci: add Lighthouse PWA + mobile a11y gate
Lighthouse CI runs on every PR against the build, with the mobile
emulation preset and these minimum scores:
- Performance >= 0.9
- Accessibility >= 0.95
- PWA category (installable manifest, service worker, themed
omnibox) must all pass
The audit runs against the three new mobile-first admin pages
(/admin/v2/orders, /admin/v2/stops, /admin/v2/products) once they
land. Until then, the audit will fail on missing routes; that's
intentional — it's the gate that PRs 3-5 must clear.
Note: package-lock.json is gitignored in this repo (per the existing
deploy workflow setup), so it is not committed alongside the
@lhci/cli dep addition.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"ci": {
|
||||
"collect": {
|
||||
"url": [
|
||||
"http://localhost:3000/admin/v2/orders",
|
||||
"http://localhost:3000/admin/v2/stops",
|
||||
"http://localhost:3000/admin/v2/products"
|
||||
],
|
||||
"numberOfRuns": 1,
|
||||
"settings": {
|
||||
"preset": "mobile",
|
||||
"emulatedFormFactor": "mobile"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"assertions": {
|
||||
"categories:performance": ["error", { "minScore": 0.9 }],
|
||||
"categories:accessibility": ["error", { "minScore": 0.95 }],
|
||||
"categories:pwa": "error",
|
||||
"installable-manifest": "error",
|
||||
"service-worker": "error",
|
||||
"themed-omnibox": "warn"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user