veza/.lighthouserc.js
senke 5088239337 feat(v0.14.0): validation runtime & staging pipeline
- TASK-STAG-001: staging-validation.yml workflow (deploy + all checks)
- TASK-STAG-002: k6 staging performance validation (p95<100ms, stream<500ms)
- TASK-STAG-003: Lighthouse CI config (perf>=85, a11y>=90, CWV thresholds)
- TASK-STAG-004: staging-stability-check.sh (5xx rate monitoring)
- TASK-STAG-005: GDPR E2E integration test (export + deletion + anonymization)
- TASK-STAG-006: bundle size check integrated in validation pipeline

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:09:43 +01:00

68 lines
2 KiB
JavaScript

/**
* Lighthouse CI Configuration
* v0.14.0 TASK-STAG-003: Validation Lighthouse
*
* Targets:
* Performance >= 85
* Accessibility >= 90
* PWA >= 90 (best-practices proxy when PWA not applicable)
* Best Practices >= 85
* SEO >= 80
*/
module.exports = {
ci: {
collect: {
url: [
`${process.env.STAGING_URL || 'https://staging.veza.app'}/login`,
`${process.env.STAGING_URL || 'https://staging.veza.app'}/register`,
],
numberOfRuns: 3,
settings: {
preset: 'desktop',
// Throttling: simulate cable connection
throttling: {
cpuSlowdownMultiplier: 1,
downloadThroughputKbps: 10240,
uploadThroughputKbps: 5120,
rttMs: 40,
},
// Skip audits that require auth
skipAudits: [
'uses-http2', // Depends on server config
],
},
},
assert: {
assertions: {
// Performance >= 85
'categories:performance': ['error', { minScore: 0.85 }],
// Accessibility >= 90
'categories:accessibility': ['error', { minScore: 0.90 }],
// Best Practices >= 85
'categories:best-practices': ['warn', { minScore: 0.85 }],
// SEO >= 80
'categories:seo': ['warn', { minScore: 0.80 }],
// Core Web Vitals
'first-contentful-paint': ['warn', { maxNumericValue: 1800 }],
'largest-contentful-paint': ['warn', { maxNumericValue: 2500 }],
'cumulative-layout-shift': ['error', { maxNumericValue: 0.1 }],
'total-blocking-time': ['warn', { maxNumericValue: 300 }],
// Accessibility specifics (ORIGIN_UI_UX_SYSTEM compliance)
'color-contrast': 'error',
'image-alt': 'error',
'label': 'error',
'button-name': 'error',
'link-name': 'error',
'document-title': 'error',
'html-has-lang': 'error',
'meta-viewport': 'error',
},
},
upload: {
target: 'filesystem',
outputDir: '.lighthouseci',
},
},
};