From d9bbb4bdc6f3c4295d7d428f3260e78895e050f4 Mon Sep 17 00:00:00 2001 From: fynyky Date: Fri, 29 May 2026 08:37:00 +0000 Subject: [PATCH] Cache Playwright browsers in CI to prevent download hangs The pretest script downloads all three browsers (~500MB total) on every run with no caching. Downloads were hanging after Chrome completed, blocking the test and publish workflows. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/publish.yml | 4 ++++ .github/workflows/test.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0cac25d..94abc1d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,5 +18,9 @@ jobs: registry-url: 'https://registry.npmjs.org' package-manager-cache: false - run: npm ci + - uses: actions/cache@v4 + with: + path: ~/.cache/ms-playwright + key: playwright-${{ hashFiles('package-lock.json') }} - run: npm test - run: npm publish \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eddbefd..d6b7bc8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,4 +14,8 @@ jobs: with: node-version: 24 - run: npm ci + - uses: actions/cache@v4 + with: + path: ~/.cache/ms-playwright + key: playwright-${{ hashFiles('package-lock.json') }} - run: npm test