Skip to content

Commit f2985e7

Browse files
turegjorupclaude
andcommitted
ci(playwright): propagate CI into the container so workers:3 applies
The first attempt set workers:3 but CI still ran 2 (Playwright's default for a 4-core box) — `docker compose run` doesn't forward host env, so process.env.CI was undefined inside the container and the CI branch of both `workers` and `retries` never triggered (a pre-existing gap: the baseline was already running the default, not 1 worker). Pass `-e CI=true` explicitly, matching how the local verification invokes it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5dd0e28 commit f2985e7

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/playwright.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,18 @@ jobs:
5656
docker compose run --rm node npm run build
5757
5858
- name: Run playwright
59-
env:
60-
CI: "true"
59+
# `-e CI=true` propagates CI *into* the container — `docker compose run`
60+
# does not forward host env by default, so without it playwright.config.ts
61+
# sees no CI and falls back to its defaults (50% of cores ≈ 2 workers,
62+
# retries 0). The explicit flag is what actually enables workers: 3 and
63+
# retries: 2 on the runner.
64+
#
6165
# The mcr.microsoft.com/playwright image already bundles the browsers for
6266
# its version, kept in lockstep with @playwright/test in package.json, so
6367
# `playwright install --with-deps` only re-runs apt for libraries that are
6468
# already present. Run the tests directly.
6569
run: |
66-
docker compose run --rm playwright npx playwright test
70+
docker compose run --rm -e CI=true playwright npx playwright test
6771
6872
- uses: actions/upload-artifact@v7
6973
if: always()

0 commit comments

Comments
 (0)