ci(lighthouse): skip Chrome install when already present
Build / Build-and-ng-test (pull_request) Successful in 3m42s
Lighthouse Checks / lighthouse (pull_request) Failing after 5m2s
Build / Build-and-test-development (pull_request) Has been cancelled

This commit is contained in:
s
2026-06-15 13:42:57 +02:00
parent 40f285f295
commit e331e1bb21
2 changed files with 10 additions and 5 deletions
+8 -3
View File
@@ -19,9 +19,14 @@ jobs:
- name: Install Google Chrome
run: |
apt-get update
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt install -y ./google-chrome*.deb
if command -v google-chrome-stable >/dev/null 2>&1; then
echo "Chrome already present."
else
apt-get update
wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt install -y ./google-chrome*.deb
fi
google-chrome-stable --version
- name: Install global packages
run: npm i -g pm2 @sasjs/cli wait-on
+2 -2
View File
@@ -51,7 +51,7 @@ This project includes automated Lighthouse performance and accessibility checks
The Lighthouse CI workflow:
1. Sets up the development environment with SASjs server and mocked services
2. Builds and serves the Angular frontend
3. Runs Lighthouse CI against key application pages
3. Installs Chrome (if absent) and runs `lhci autorun` (Lighthouse CI) against key pages
4. Uploads results as artifacts for review
To run Lighthouse checks locally:
@@ -61,4 +61,4 @@ npm install
npm run lighthouse
```
Configuration is in `client/lighthouserc.js`.
Configuration is in `client/lighthouserc.js` (URL list, `desktop` preset, Chrome flags, assertions).