Makes Lighthouse performance report-only in CI
Lighthouse slows the CPU 4x relative to the measuring machine, so the Raspberry Pi runner scores performance 30-40 points lower than a PC for the same build. In CI the performance assertions now only warn; accessibility, best practices and SEO still block, and performance still blocks in `pnpm check` on a PC. Mobile and desktop reports go to separate folders and are attached to every run as an artifact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -34,7 +34,7 @@ Text alternative: feature branches go through a pull request with CI into master
|
||||
| D3 | **Environments**: test and production. | Q5 = B |
|
||||
| D4 | **Test deploy**: automatically on every push to `master` (incl. a merged PR), and manually from any branch with "Deploy to Test", for example to try a branch before merging. | Q6 = B, CQ1 |
|
||||
| D5 | **Production deploy**: manual only ("Deploy to Production"), and only from a `release/*` branch; the workflow refuses other branches. | Q6 = B, CQ1 |
|
||||
| D6 | **Quality gate**: every run does lint, format, tests, build, audit and Lighthouse (mobile + desktop) before any deploy job can start. | Q7 = A |
|
||||
| D6 | **Quality gate**: every run does lint, format, tests, build, audit and Lighthouse (mobile + desktop) before any deploy job can start. In CI, Lighthouse **Performance is report-only** (the Pi runner gives scores 30-40 points too low); accessibility, best practices and SEO block. Performance blocks in `pnpm check` on a PC. HTML reports are attached to every run as the `lighthouse-reports` artifact. | Q7 = A; Lighthouse CI question A |
|
||||
| D7 | **Chrome for Lighthouse**: Playwright's Chromium (supports linux-arm64), installed in the job with a pinned Playwright version. Not the browser on the host: jobs run in containers and cannot see it. | CQ5 |
|
||||
| D8 | **Test target**: Raspberry Pi with nginx behind the reverse-proxy Pi, **next to the current WordPress site**. Deploy over SSH (`sshpass` + `scp`, same secrets as your other projects). Simple: empty the test folder, then copy the new build in; no old versions are kept. The step refuses an empty path, `/`, or a folder containing WordPress (`wp-config.php` / `wp-content`). The nginx block has its own `server_name` and never `default_server`. | CQ4 = B; owner: simpler than other apps, must not conflict with WordPress |
|
||||
| D9 | **Test is never indexed**: `X-Robots-Tag: noindex, nofollow` and a `robots.txt` that disallows everything. | Derived |
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Lighthouse in CI — vraag
|
||||
|
||||
## Situatie (run 529)
|
||||
- Lighthouse draait nu op alle 7 pagina's op de runner. **Toegankelijkheid, Best Practices en SEO halen hun doelen** (100).
|
||||
- **Performance faalt overal**: 0,49–0,66 op de Raspberry Pi, tegen 0,82–0,95 op een pc. Het is dezelfde build.
|
||||
- **Oorzaak**: Lighthouse simuleert een middelmatige telefoon door de CPU **4× te vertragen ten opzichte van de meetmachine**, en gaat ervan uit dat die meetmachine een snelle desktop is (pc: benchmarkIndex ≈ 4200). Een Pi is zelf al veel trager, en daar komt die 4× bovenop. Lighthouse waarschuwt zelf dat performance op zwakke hardware niet representatief is.
|
||||
|
||||
## Vraag 1: Wat doet Performance in de pipeline?
|
||||
A) In CI **Performance alleen melden** (waarschuwing in de log, met de rapporten als download bij de run). Toegankelijkheid, Best Practices en SEO blijven **blokkerend**. De blokkerende Performance-controle blijft in `pnpm check` op je pc, waar de meting wel klopt. **(aanbevolen)** De CI blijft betrouwbaar en vangt toegankelijkheid en SEO toch op.
|
||||
B) Performance in CI blijft blokkerend, maar de CPU-vertraging wordt aangepast aan de snelheid van de Pi (minder dan 4×), zodat de meting dichter bij een pc komt. Nauwkeuriger te maken, maar de juiste vertraging moet ik met een paar runs afstemmen, en een Pi onder wisselende belasting (andere builds) geeft wisselende scores. Kans op af en toe een onterecht rode pipeline.
|
||||
C) Lighthouse helemaal uit de pipeline, alleen lokaal in `pnpm check`
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
Reference in New Issue
Block a user