From f2f5c6a83ee721407b172f87e5a13a92142cf45d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Wed, 25 Mar 2026 00:15:26 +0100 Subject: [PATCH] Cache Playwright browsers in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Playwright browser download (25s) is now cached by pnpm-lock hash. On cache hit, only install system deps (fast). On miss, full install. Current E2E timings (first run): - Postgres container: 19s - BRouter JAR: cached - Berlin segment: 6s (will be cached next run) - Playwright install: 25s → cached after first run - BRouter startup: 9s - Tests: 27s Expected after caching: ~60s total (down from ~107s). Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/ci.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c07ab8..6e4b288 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,7 +139,20 @@ jobs: env: BROUTER_URL: http://localhost:17777 - - run: pnpm exec playwright install --with-deps chromium + - name: Cache Playwright browsers + id: playwright-cache + uses: actions/cache@v4 + with: + path: ~/.cache/ms-playwright + key: playwright-${{ hashFiles('pnpm-lock.yaml') }} + + - name: Install Playwright + if: steps.playwright-cache.outputs.cache-hit != 'true' + run: pnpm exec playwright install --with-deps chromium + + - name: Install Playwright deps only + if: steps.playwright-cache.outputs.cache-hit == 'true' + run: pnpm exec playwright install-deps chromium - name: Run E2E tests run: pnpm test:e2e