build: fix lighthouse again 4

This commit is contained in:
Johannes Millan 2025-10-30 17:45:12 +01:00
parent f57c178981
commit 911e81deb4
2 changed files with 11 additions and 3 deletions

View file

@ -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'

View file

@ -2,7 +2,7 @@
"ci": {
"collect": {
"staticDistDir": "./dist",
"numberOfRuns": 3,
"numberOfRuns": 1,
"url": ["/browser/index.html"],
"settings": {
"disableServiceWorker": true,