-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Problem
The default GitHub Actions workflow generated by Playwright takes quite a lot of time to install Playwright Browsers, and sometimes fail entirely.
-
Example 1: It takes 3.5m to run
playwright install --with-deps
-
Example 2: Sometimes
azure.archive.ubuntu.comis unstable. In most Node.js applications we never have a need to runapt-get installexcept when installing Playwright browsers. This has been one of the most common cause of our build failures.
Since we run our tests on many workers, this Playwright installation failure costed us 10 hours of GitHub Actions billable time.
Request
-
Make the default GitHub Actions pipeline not rely onUpdate: “It's unfortunately not possible”aptinstalls. -
Update the docs to avoid running
playwright installdirectly and use a Docker image to run instead, so people who follow the docs get the best testing experience. (Maybe update the template in create-playwright?)
For people who face the same issue
I am also exploring solutions as I create this issue, which I will update here as I find more workarounds.
For others who face the same issue: I would like to know how other people work around this problem, so maybe we can find the best one faster. If you have worked around this in some way, please share how you do it.
Workarounds summary
- 💡 Set
jobs.<job_id>.container.imagetomcr.microsoft.com/playwright:v1.34.3-jammy - 💡 Define and use a custom Docker action.
- ⭐ Use Playwright’s Docker image in
jobs.<job_id>.steps[*].uses.
(⭐ = I am using this one now.)