Skip to content

Commit 23abb3d

Browse files
sorccuclaude
andauthored
fix(ci): pass --shard to vitest in the windows e2e matrix [RED-738] (#1415)
The `e2e - checkly - windows` job declares a 4-way shard matrix, but all four shards ran the entire 27-file e2e suite. pnpm forwards a literal `--` verbatim into the script (npm strips it), where vitest's parser collects everything after it into an argument list it never reads — silently discarding --shard. Dropping the separator is sufficient: pnpm appends trailing args to the script command as-is, so --shard reaches vitest without one. The compound `test:e2e` script is not the cause. Args appended to `A && B` land at the end of B, and B is the vitest invocation. Verified locally that the four shards now partition the suite 7/7/7/6 into 27 unique files. A green run is not evidence on its own — the broken form passed too, running the full suite four times over. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b16528a commit 23abb3d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,15 @@ jobs:
174174
cache: "pnpm"
175175
- run: pnpm install --frozen-lockfile
176176
- run: pnpm run prepack
177-
- run: pnpm --filter checkly run test:e2e -- --shard=${{ matrix.shard }}
177+
# Deliberately no `--` separator: pnpm appends trailing args to the
178+
# script command as-is, so --shard reaches vitest without one. Unlike
179+
# npm, pnpm forwards a literal `--` verbatim into the script, where
180+
# vitest's parser collects everything after it into an argument list it
181+
# never reads — silently discarding --shard. The suite still passes when
182+
# that happens, so a green run is not evidence the flag landed; check
183+
# that each shard reports fewer test files than the full suite and that
184+
# the four counts sum to it.
185+
- run: pnpm --filter checkly run test:e2e --shard=${{ matrix.shard }}
178186
env:
179187
CHECKLY_ACCOUNT_NAME: ${{ secrets.E2E_CHECKLY_ACCOUNT_NAME }}
180188
CHECKLY_ACCOUNT_ID: ${{ secrets.E2E_CHECKLY_ACCOUNT_ID }}

0 commit comments

Comments
 (0)