-
Notifications
You must be signed in to change notification settings - Fork 805
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
E2E Tests: Only install Chromium and its deps for Playwright #40827
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks like a good optimization for me, thanks for implementing that!
It might be interesting to include the context of how did you figure out the issue.
In this case I saw the output in the GH Action logs downloading multiple browsers and showing the dependency error, knew we only used one browser, and so updated our process to download the one with its dependencies. |
Right now we use default settings to install Chromium, Firefox, and Webkit for Playwright prior to running E2E tests, but we only use Chromium in our config. GH Actions also shows missing dependencies. This PR fixes both of those by switching from this:
playwright install
to this:
playwright install --with-deps chromium
It trades about 10 seconds of unneeded installs for about 15 seconds of dependencies, which means this is technically slower by a few seconds. We could remove the
--with-deps
if we prefer since tests run fine anyway, though I don't see a way to suppress those dependency warnings.I considered
--only-shell
, but this would force headless on local installs, which isn't ideal.Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Here's an old run with multiple browsers downloaded and the dependency warning:
https://github.com/Automattic/jetpack/actions/runs/12585666388/job/35077965663