From 50198f3d37cffdcfdb7f98897643bfaee41c71c5 Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Wed, 19 Aug 2026 13:18:45 -0400 Subject: [PATCH] ci: stop apt from gating the showcase Chromium install `npx playwright install --with-deps chromium` shells out to apt-get, and the Azure Ubuntu mirror on GitHub's runners intermittently stops responding there. It stalled this job for 21 minutes on PR #1032, and on PR #1031 it hit the 10-minute step bound from #1033 with apt still retrying InRelease fetches against azure.archive.ubuntu.com. Every other step in the job passed both times, and the same job succeeded in ~2 minutes on other runs, so the browser download itself was never the problem. Drop --with-deps. The ubuntu-24.04 runner image already ships Chromium's shared libraries, and Playwright here is pinned to 1.57, well past the 1.45 release where Ubuntu 24.04 support landed. If a future image drops a library, the launch fails fast with a missing-library error naming it, which is a better signal than an apt hang and is fixable by adding that one package instead of putting all of apt back on the critical path. Also cache ~/.cache/ms-playwright keyed on the lockfile. The browser only changes when the pinned Playwright version does, so most runs now skip the download entirely rather than re-fetching it. --- .github/workflows/test.yml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 226e3bae1..31278433d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,11 +84,29 @@ jobs: cache-dependency-path: packages/mix_winds/tool/visual-comparison/package-lock.json - name: Install Node dependencies run: npm ci + # Skips the download entirely on a hit. The browser only changes when the + # pinned Playwright version does, so the lockfile is the right key. + - name: Cache Playwright browsers + id: playwright-cache + uses: actions/cache@v4 + with: + path: ~/.cache/ms-playwright + key: >- + playwright-${{ runner.os }}-${{ + hashFiles('packages/mix_winds/tool/visual-comparison/package-lock.json') + }} - name: Install Chromium - # This download wedged for 20+ minutes on PR #1032 while every other - # step passed. A step bound fails on the actual culprit instead of - # letting the job time out with the cause buried. + # Deliberately no --with-deps. That flag shells out to apt-get, and the + # Azure Ubuntu mirror on GitHub's runners intermittently hangs there: + # it stalled this job for 21 minutes on PR #1032 and again to the + # 10-minute bound on PR #1031, while every other step passed. The + # ubuntu-24.04 image already ships Chromium's shared libraries, and + # Playwright is pinned well past 1.45, which is where 24.04 support + # landed. If a future image drops a library, this fails fast with a + # missing-library error naming it -- add just that package rather than + # putting all of apt back on the critical path. + if: steps.playwright-cache.outputs.cache-hit != 'true' timeout-minutes: 10 - run: npx playwright install --with-deps chromium + run: npx playwright install chromium - name: Run showcase tool tests run: npm test