Skip to content

Commit

Permalink
Disable playwright browser cache in CI
Browse files Browse the repository at this point in the history
As per the Playwright docs, caching browsers is not recommended, both
because downloading the binary is not much slower, but also because
system dependencies are required, and these cannot be cached. Even
worse, the system dependencies can become stale as the CI images
get upgraded. This seems to have happened recently, with persistent
"It looks like you are using Playwright Sync API inside the asyncio
loop." errors sporadically appearing (in this case, for webkit only)
and this being fixed, without further code changes, by disabling the
browser cache.
  • Loading branch information
swrichards committed Oct 17, 2024
1 parent 224f34b commit 728a457
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,6 @@ jobs:
setup-node: 'yes'
npm-ci-flags: '--legacy-peer-deps'

# See https://playwright.dev/python/docs/ci#caching-browsers
- name: Cache Playwright browser
id: cache-browser
uses: actions/cache@v3
with:
path: /home/runner/.cache/ms-playwright
key: ${{ runner.os }}-${{ matrix.browser }}-playwright-${{ hashFiles('requirements/ci.txt') }}

- name: Install playwright deps
run: playwright install --with-deps ${{ matrix.browser }}

Expand Down

0 comments on commit 728a457

Please sign in to comment.