From 911e81deb4076ba27d358d2284811027eaee61eb Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Thu, 30 Oct 2025 17:45:12 +0100 Subject: [PATCH] build: fix lighthouse again 4 --- .github/workflows/lighthouse-ci.yml | 12 ++++++++++-- tools/lighthouse/.lighthouserc.json | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lighthouse-ci.yml b/.github/workflows/lighthouse-ci.yml index b6a944890..d4c35d896 100644 --- a/.github/workflows/lighthouse-ci.yml +++ b/.github/workflows/lighthouse-ci.yml @@ -31,6 +31,14 @@ jobs: - name: Build production web app run: npm run buildFrontend:prodWeb + - name: Add swap space for Lighthouse + run: | + # Ensure Lighthouse/Chrome have enough memory on GitHub-hosted runners + sudo fallocate -l 4G /swapfile + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile + - name: Strip service worker artifacts for Lighthouse run: rm -f dist/browser/ngsw.json dist/browser/ngsw-worker.js dist/browser/safety-worker.js dist/browser/worker-basic.min.js @@ -42,7 +50,7 @@ jobs: # Upload results to temporary storage uploadArtifacts: true temporaryPublicStorage: true - # Run 3 times for consistency - runs: 3 + # Run once to avoid long Chrome sessions on CI + runs: 1 # Configure budgets budgetPath: './tools/lighthouse/budget.json' diff --git a/tools/lighthouse/.lighthouserc.json b/tools/lighthouse/.lighthouserc.json index 5d1940ee5..932f43b79 100644 --- a/tools/lighthouse/.lighthouserc.json +++ b/tools/lighthouse/.lighthouserc.json @@ -2,7 +2,7 @@ "ci": { "collect": { "staticDistDir": "./dist", - "numberOfRuns": 3, + "numberOfRuns": 1, "url": ["/browser/index.html"], "settings": { "disableServiceWorker": true,