Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: remove caching of Playwright browsers #785

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

mxschmitt
Copy link
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

@@ -13,8 +13,6 @@ env:
# 7 GiB by default on GitHub, setting to 6 GiB
# 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
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
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
3 checks passed
@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.

None yet

2 participants