-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Feature] Option to not remove unused browsers #5797
Comments
This is certainly possible but since it'd introduce another installation flow we need to better understand if it's justified. Can you share a bit more details about your use case, do you want to mount some shared volume at ~/.cache and have all the browsers preinstalled there? What's the benefit of it compared to preinstalling required browsers into corresponding docker images (I'm assuming they will anyway have different playwright versions)? |
Sure! One of the steps we want to avoid is to have to build a docker image per CI build, right now we just mount the current directory as a volume (including node_modules) and run the tests there (on a docker-playwright image). Building a docker repo specific image would also require rerunning npm install in CI which is a pretty expensive step as well. The only reason we need a docker image is because we can't run open the browsers on the out of the box CI machines. I also see this being useful if the user has something like |
Thanks for explaining! You can make Playwright skip the browser download step altogether by setting
|
Not really since I do need to install the browser when necessary, I only don't want to to blast away other installations as well during that process. In the case of someone using |
Wow, thanks! |
Is there no way for it to use the same downloaded browser between two different runs? |
I have a global cache for all browsers that will run in different docker images and with different versions. Specifically, I have a /.cache directory that stores all the browsers I care about and I plan on pruning that as necessary.
Is it possible to introduce an ENV variable to opt out of the browser autocleanup?
TL;DR: ENV var to opt out of "Removing unused browser" install step
The text was updated successfully, but these errors were encountered: