Skip to content

Playwright browsers

Avrea caches the archives downloaded by playwright install. Repeat downloads of the same browser revision and platform use the packages cache.

When Package Manager Cache and Playwright Browser Cache are enabled, Avrea configures:

Terminal window
PLAYWRIGHT_DOWNLOAD_HOST="https://cache.avrea.com:8443/playwright"

Use your normal install command:

- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npx playwright test

This covers Chromium (including Chrome for Testing and headless shell), Firefox, WebKit, and Playwright's helper archives such as FFmpeg. Downloads are cached automatically and reused across jobs.

Avrea caches browser download archives. Playwright extracts and installs them on each fresh runner.

The Playwright npm package uses the npm cache. Linux dependencies installed by --with-deps use the OS packages cache when enabled.

Playwright Browser Cache (cache.playwright-browsers.enabled) is enabled by default. Turn it on or off at the organization or repository level under Settings in the Avrea console. Package Manager Cache (cache.packages.enabled) must also remain enabled.

Disable it for a repository with the CLI:

Terminal window
avr settings set cache.playwright-browsers.enabled false

Re-enable it:

Terminal window
avr settings set cache.playwright-browsers.enabled true

Reset to the inherited default:

Terminal window
avr settings reset cache.playwright-browsers.enabled

Repository overrides take precedence over organization settings. Changes apply to new jobs. See Managing caches.

Workflow or step environment variables can override PLAYWRIGHT_DOWNLOAD_HOST. Playwright's PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST, PLAYWRIGHT_FIREFOX_DOWNLOAD_HOST, and PLAYWRIGHT_WEBKIT_DOWNLOAD_HOST take precedence for their respective browsers. See the Playwright artifact repository documentation.

To use Playwright's default download hosts for a step, clear the general override and any browser-specific overrides you configured:

- run: npx playwright install chromium
env:
PLAYWRIGHT_DOWNLOAD_HOST: ""