Skip to content

ci: remove caching of Playwright browsers#785

Merged
danielroe merged 1 commit intonuxt:mainfrom
mxschmitt:devops/remove-caching-browsers
Mar 16, 2024
Merged

ci: remove caching of Playwright browsers#785
danielroe merged 1 commit intonuxt:mainfrom
mxschmitt:devops/remove-caching-browsers

Conversation

@mxschmitt
Copy link
Copy Markdown
Collaborator

Caching the Playwright browsers is a concept which often leads to confusion, since yes, browsers can be cached, but they also rely on operating system dependencies, which can't be cached.

This might work for Chromium, since GitHub Action environments have all the OS dependencies already pre-installed for running Chromium, but for WebKit / Firefox this won't work (launch will yell with dependencies missing error).

So having this extra complexity for saving 1-5 seconds on a process (downloading the browsers) which only takes 5 seconds seems not worth it (restoring the cache takes a similar duration)

See also here: https://playwright.dev/docs/ci#caching-browsers

# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
NODE_OPTIONS: --max-old-space-size=6144
# install playwright binary manually (because pnpm only runs install script once)
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive-by: Playwright does not install browsers as part of install script since v1.38.

@mxschmitt mxschmitt force-pushed the devops/remove-caching-browsers branch from 05794ba to 163553c Compare March 16, 2024 14:11
@mxschmitt mxschmitt changed the title devops: remove caching of Playwright browsers ci: remove caching of Playwright browsers Mar 16, 2024
Copy link
Copy Markdown
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@danielroe danielroe merged commit 073afc3 into nuxt:main Mar 16, 2024
@github-actions github-actions bot mentioned this pull request Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants