// Lighthouse CI — budget di §9.3 del brief (preset mobile di Lighthouse, 3 run, mediana). // Chrome: si usa il Chromium installato da Playwright, così funziona anche nel container CI. const { chromium } = require('playwright'); module.exports = { ci: { collect: { staticDistDir: './dist', url: [ 'http://localhost/', 'http://localhost/servizi/', 'http://localhost/servizi/consulenza-fiscale-tributaria-e-societaria/', 'http://localhost/contatti/', ], numberOfRuns: 3, chromePath: chromium.executablePath(), settings: { chromeFlags: '--no-sandbox --headless=new --disable-dev-shm-usage --disable-gpu', }, }, assert: { preset: 'lighthouse:recommended', aggregationMethod: 'median-run', assertions: { 'categories:performance': ['error', { minScore: 0.95 }], 'categories:accessibility': ['error', { minScore: 1 }], 'categories:best-practices': ['error', { minScore: 0.95 }], 'categories:seo': ['error', { minScore: 1 }], }, }, upload: { // Nessun invio a servizi esterni: i report restano in locale. target: 'filesystem', outputDir: '.lighthouseci/reports', }, }, };