mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-06 22:49:16 +00:00
fix: cache Playwright browsers instead of reinstalling them via apt
performance_smoke burned nearly all of its 15-minute budget before the benchmark even started, twice in a row: validate.yml had no browser cache at all, so every browser job paid for a full `playwright install --with-deps` — apt work the ubuntu-latest image makes redundant, with unbounded retries against an unreachable azure mirror on top. For a measuring job that is worse than lost minutes: the timing window competes with package installation on the same runner. #175 fixed this for the review pipeline but deliberately left the flag here, reasoning that a prerelease gate values predictability over minutes. That reasoning was wrong — the flag is what made the gate unpredictable. Browsers are now cached per package-lock hash in smoke, golden, performance_smoke and the full performance run; installation happens only on a cache miss and no longer touches apt. performance_smoke keeps headroom for a cold cache at 20 minutes. If the image ever drops a required library, Chromium fails to launch with a clear missing-libraries error; that is the moment to bring the flag back. Issue: #206 User-Visible: no
This commit is contained in:
@@ -132,9 +132,17 @@ jobs:
|
||||
- name: Install candidate and baseline dependencies
|
||||
run: npm ci --prefix candidate && npm ci --prefix baseline
|
||||
|
||||
# То же, что в validate.yml: кэш браузеров, apt не трогаем (#206).
|
||||
- name: Кэш браузеров Playwright
|
||||
id: pw
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: playwright-${{ runner.os }}-${{ hashFiles('candidate/package-lock.json') }}
|
||||
- name: Install pinned Chromium
|
||||
if: steps.pw.outputs.cache-hit != 'true'
|
||||
working-directory: candidate
|
||||
run: npx playwright install --with-deps chromium
|
||||
run: npx playwright install chromium
|
||||
|
||||
- name: Build both exact source trees
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user