ci workflow: Playwright browser cache keyed by playwright-core's browsers.json (the repo has no bun.lock, the key was empty)

This commit is contained in:
CRTkafa 2026-10-13 02:57:18 +08:00
parent b9579e2a2e
commit 54c3bbac2c

View file

@ -61,12 +61,13 @@ jobs:
rustup component add clippy
bun --version && cargo --version
bun install --frozen-lockfile
# Playwright's Chromium and headless shell (~280 MB), keyed by the locked playwright version; the system
# libraries and fonts (--with-deps) are installed on every run, the job container starts clean
# Playwright's Chromium and headless shell (~280 MB), keyed by the browser builds the installed playwright-core
# wants (its browsers.json); the system libraries and fonts (--with-deps) are installed on every run, the job
# container starts clean
- uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('bun.lock') }}
key: playwright-${{ runner.os }}-${{ hashFiles('node_modules/playwright-core/browsers.json') }}
restore-keys: playwright-${{ runner.os }}-
# the job runs as root in a container: storebound adds --no-sandbox to the Chromium it starts itself there
# (cli/shots/browser.ts sandboxArgs), Playwright's own launches already pass it