Skip to content

ci: cache Playwright browser downloads in the Playwright workflows #4920

Description

@NoopDog

Problem

Both Playwright workflows (run-playwright-tests-anvil-catalog.yml, run-playwright-tests-anvil-cmg.yml) run npx playwright install --with-deps on every push/PR run, re-downloading several hundred MB of Chromium/Firefox/WebKit bundles each time — typically 1–3 minutes per run. This is now the largest uncached recurring cost in CI (npm tarballs are cached as of #4919).

Proposal

Cache ~/.cache/ms-playwright with actions/cache, keyed on the Playwright version from package-lock.json (e.g. playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }} or extracting the exact @playwright/test version), and skip or reduce playwright install on a cache hit (--with-deps OS packages still need installing; playwright install-deps alone can cover that case).

Surfaced during review of #4919; split out to keep that change scoped to Node version resolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions