4242 - name : Setup network
4343 run : docker network create frontend
4444
45+ - name : Pull container images
46+ # Pull all images this job uses up front, in parallel (compose pulls
47+ # services concurrently). Otherwise each image is pulled on demand inside
48+ # the first step that uses it — serially across steps (~90s total:
49+ # mariadb+phpfpm in Composer install, node in Build assets,
50+ # nginx+playwright in Run playwright). Pulling concurrently overlaps the
51+ # smaller images under the large playwright pull.
52+ run : docker compose pull --quiet phpfpm node playwright nginx mariadb
53+
4554 - name : Composer install
4655 run : |
4756 docker compose run --rm phpfpm composer install
@@ -56,11 +65,18 @@ jobs:
5665 docker compose run --rm node npm run build
5766
5867 - name : Run playwright
59- env :
60- CI : " true"
68+ # `-e CI=true` propagates CI *into* the container — `docker compose run`
69+ # does not forward host env by default, so without it playwright.config.ts
70+ # sees no CI and falls back to its defaults (50% of cores ≈ 2 workers,
71+ # retries 0). The explicit flag is what actually enables workers: 3 and
72+ # retries: 2 on the runner.
73+ #
74+ # The mcr.microsoft.com/playwright image already bundles the browsers for
75+ # its version, kept in lockstep with @playwright/test in package.json, so
76+ # `playwright install --with-deps` only re-runs apt for libraries that are
77+ # already present. Run the tests directly.
6178 run : |
62- docker compose run --rm playwright npx playwright install --with-deps
63- docker compose run --rm playwright npx playwright test
79+ docker compose run --rm -e CI=true playwright npx playwright test
6480
6581 - uses : actions/upload-artifact@v7
6682 if : always()
0 commit comments