From 90645da2f25a99ebaa279aad30ba6404ad6d560d Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Fri, 17 Jul 2026 21:47:05 +0900 Subject: [PATCH] fix(ci): pass --shard to vitest in the windows e2e matrix [RED-738] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .github/workflows/test.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b9bdabe02..c65d62c27 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -174,7 +174,15 @@ jobs: cache: "pnpm" - run: pnpm install --frozen-lockfile - run: pnpm run prepack - - run: pnpm --filter checkly run test:e2e -- --shard=${{ matrix.shard }} + # Deliberately no `--` separator: pnpm appends trailing args to the + # script command as-is, so --shard reaches vitest without one. Unlike + # npm, pnpm forwards a literal `--` verbatim into the script, where + # vitest's parser collects everything after it into an argument list it + # never reads — silently discarding --shard. The suite still passes when + # that happens, so a green run is not evidence the flag landed; check + # that each shard reports fewer test files than the full suite and that + # the four counts sum to it. + - run: pnpm --filter checkly run test:e2e --shard=${{ matrix.shard }} env: CHECKLY_ACCOUNT_NAME: ${{ secrets.E2E_CHECKLY_ACCOUNT_NAME }} CHECKLY_ACCOUNT_ID: ${{ secrets.E2E_CHECKLY_ACCOUNT_ID }}