@@ -924,15 +924,17 @@ jobs:
924924 # flavors on Linux and macOS: the local flavor uses the packages/cli build
925925 # from this job, the global flavor reuses the installed release binary via
926926 # VP_SNAP_GLOBAL_VP (no vp_global_cli compile; build-upstream builds or
927- # cache-restores it). One leg per OS: the suite is not sharded. Windows
928- # runs in cli-snapshot-test-windows via the cross-compiled archive.
927+ # cache-restores it). Three shards per OS split the trials across runners.
928+ # Windows runs in cli-snapshot-test-windows via the cross-compiled archive.
929929 cli-snapshot-test :
930- name : CLI snapshot test (${{ matrix.target }})
930+ name : CLI snapshot test (${{ matrix.target }}, shard ${{ matrix.shard }}/3 )
931931 needs :
932932 - download-previous-rolldown-binaries
933933 strategy :
934934 fail-fast : false
935935 matrix :
936+ os : [namespace-profile-linux-x64-default, namespace-profile-mac-default]
937+ shard : [1, 2, 3]
936938 include :
937939 - os : namespace-profile-linux-x64-default
938940 target : x86_64-unknown-linux-gnu
@@ -1020,18 +1022,23 @@ jobs:
10201022 cargo test -p vp_cli_snapshots
10211023 env :
10221024 RUST_BACKTRACE : ' 1'
1025+ VP_SNAP_SHARD : ${{ matrix.shard }}/3
10231026
10241027 # Runs the PTY snapshot suite (crates/vp_cli_snapshots) on Windows with
10251028 # BOTH vp flavors, without a Rust toolchain on the runner: the test binary
10261029 # and vpt arrive cross-compiled in the nextest archive from
10271030 # build-windows-tests, the global vp comes prebuilt from build-windows-cli,
10281031 # and the JS CLI is built here (skip-native) for the local flavor.
10291032 cli-snapshot-test-windows :
1030- name : CLI snapshot test (Windows)
1033+ name : CLI snapshot test (Windows, shard ${{ matrix.shard }}/3 )
10311034 needs :
10321035 - download-previous-rolldown-binaries
10331036 - build-windows-cli
10341037 - build-windows-tests
1038+ strategy :
1039+ fail-fast : false
1040+ matrix :
1041+ shard : [1, 2, 3]
10351042 # Runs on the Namespace Windows runner. This is a PTY snapshot suite that
10361043 # opens a pseudo-console (ConPTY) and spawns vp into it. It previously stayed
10371044 # on GitHub-hosted windows-latest because Namespace's Windows runners ran
@@ -1129,7 +1136,7 @@ jobs:
11291136 export VP_SNAP_PWSH_BIN="$(cygpath -w "$(command -v pwsh.exe)")"
11301137 # --no-fail-fast: on a snapshot suite every diff is diagnostic
11311138 # signal; cancelling on the first failure hides the rest.
1132- cargo-nextest nextest run --archive-file windows-snapshot-tests.tar.zst --workspace-remap . --no-fail-fast
1139+ cargo-nextest nextest run --archive-file windows-snapshot-tests.tar.zst --workspace-remap . --no-fail-fast --partition hash:${{ matrix.shard }}/3
11331140 env :
11341141 RUST_BACKTRACE : ' 1'
11351142 # Keep Windows env parity with the `test` recipe in justfile.
0 commit comments