From 2c587dd04754cbe8b54733fdc8189b23f24ee7a0 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 24 May 2026 18:27:25 +0000 Subject: [PATCH 1/6] ci(test): shard Windows e2e_snapshots into 5 parallel jobs Windows is the long pole of CI: PTY steps timeout at 60s vs 20s on Unix, and `vite_task_bin` e2e fixtures expand to 156 trials that run serially inside one job. Linux/macOS finish well before Windows, so each PR waits on Windows alone. The e2e harness now reads VT_SHARD_INDEX and VT_SHARD_TOTAL and applies round-robin partitioning at the Trial level (not the fixture level) so that cases inside a heavy fixture scatter across shards. A separate VT_SKIP_E2E knob lets a sibling Windows job run the full workspace `cargo test` while the e2e_snapshots binary self-skips. CI matrix gains six Windows entries: five e2e shards (~31 trials each) plus one non-e2e job that covers plan_snapshots, fspy tests, and unit tests. Linux/macOS/musl are unchanged. All entries run the same three `cargo test` commands, parameterized by per-shard `scope` and `run_env` matrix fields. --- .github/workflows/ci.yml | 67 ++++++++++++++++--- .../vite_task_bin/tests/e2e_snapshots/main.rs | 41 ++++++++++++ 2 files changed, 100 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9428c348..9bc61c33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,7 +68,7 @@ jobs: test: needs: detect-changes if: needs.detect-changes.outputs.code-changed == 'true' - name: Test + name: Test (${{ matrix.shard }}) strategy: fail-fast: false matrix: @@ -77,18 +77,69 @@ jobs: target: x86_64-unknown-linux-gnu cargo_cmd: cargo-zigbuild build_target: x86_64-unknown-linux-gnu.2.17 - - os: windows-latest - target: x86_64-pc-windows-msvc - cargo_cmd: cargo - build_target: x86_64-pc-windows-msvc + shard: linux-gnu + scope: '' + run_env: '' - os: namespace-profile-mac-default target: aarch64-apple-darwin cargo_cmd: cargo build_target: aarch64-apple-darwin + shard: macos-arm64 + scope: '' + run_env: '' - os: namespace-profile-mac-default target: x86_64-apple-darwin cargo_cmd: cargo build_target: x86_64-apple-darwin + shard: macos-x64 + scope: '' + run_env: '' + # Windows e2e fixtures dominate wall-clock (60s per PTY step vs 20s on + # Unix). Sharded 5 ways at the trial level by the e2e harness via + # VT_SHARD_INDEX/VT_SHARD_TOTAL; the non-e2e shard self-skips the e2e + # binary via VT_SKIP_E2E and runs everything else. + - os: windows-latest + target: x86_64-pc-windows-msvc + cargo_cmd: cargo + build_target: x86_64-pc-windows-msvc + shard: windows-e2e-1 + scope: '-p vite_task_bin --test e2e_snapshots' + run_env: 'VT_SHARD_INDEX=1 VT_SHARD_TOTAL=5' + - os: windows-latest + target: x86_64-pc-windows-msvc + cargo_cmd: cargo + build_target: x86_64-pc-windows-msvc + shard: windows-e2e-2 + scope: '-p vite_task_bin --test e2e_snapshots' + run_env: 'VT_SHARD_INDEX=2 VT_SHARD_TOTAL=5' + - os: windows-latest + target: x86_64-pc-windows-msvc + cargo_cmd: cargo + build_target: x86_64-pc-windows-msvc + shard: windows-e2e-3 + scope: '-p vite_task_bin --test e2e_snapshots' + run_env: 'VT_SHARD_INDEX=3 VT_SHARD_TOTAL=5' + - os: windows-latest + target: x86_64-pc-windows-msvc + cargo_cmd: cargo + build_target: x86_64-pc-windows-msvc + shard: windows-e2e-4 + scope: '-p vite_task_bin --test e2e_snapshots' + run_env: 'VT_SHARD_INDEX=4 VT_SHARD_TOTAL=5' + - os: windows-latest + target: x86_64-pc-windows-msvc + cargo_cmd: cargo + build_target: x86_64-pc-windows-msvc + shard: windows-e2e-5 + scope: '-p vite_task_bin --test e2e_snapshots' + run_env: 'VT_SHARD_INDEX=5 VT_SHARD_TOTAL=5' + - os: windows-latest + target: x86_64-pc-windows-msvc + cargo_cmd: cargo + build_target: x86_64-pc-windows-msvc + shard: windows-non-e2e + scope: '' + run_env: 'VT_SKIP_E2E=1' runs-on: ${{ matrix.os }} steps: - uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2 @@ -124,13 +175,13 @@ jobs: if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} - name: Build tests - run: ${{ matrix.cargo_cmd }} test --no-run --target ${{ matrix.build_target }} + run: ${{ matrix.cargo_cmd }} test --no-run ${{ matrix.scope }} --target ${{ matrix.build_target }} # Default `cargo test` runs only tests that need nothing beyond the # Rust toolchain; this step verifies that contract before Node.js # and pnpm enter the picture. - name: Run tests - run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} + run: ${{ matrix.run_env }} ${{ matrix.cargo_cmd }} test ${{ matrix.scope }} --target ${{ matrix.build_target }} # x86_64-apple-darwin runs on arm64 runner under Rosetta; install x64 Node # so fspy's x86_64 preload dylib can be injected into spawned node procs. @@ -139,7 +190,7 @@ jobs: architecture: ${{ matrix.target == 'x86_64-apple-darwin' && 'x64' || '' }} - name: Run ignored tests - run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} -- --ignored + run: ${{ matrix.run_env }} ${{ matrix.cargo_cmd }} test ${{ matrix.scope }} --target ${{ matrix.build_target }} -- --ignored test-musl: needs: detect-changes diff --git a/crates/vite_task_bin/tests/e2e_snapshots/main.rs b/crates/vite_task_bin/tests/e2e_snapshots/main.rs index 45adbada..4193e505 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/main.rs +++ b/crates/vite_task_bin/tests/e2e_snapshots/main.rs @@ -547,8 +547,37 @@ fn run_case( Ok(()) } +/// Parses `VT_SHARD_INDEX` (1..=total) and `VT_SHARD_TOTAL` env vars for CI +/// sharding. Both unset means "run all trials". Both set selects one shard via +/// round-robin. Exactly one set is a CI misconfiguration and panics. +fn parse_shard_env() -> Option<(usize, usize)> { + let index = std::env::var("VT_SHARD_INDEX").ok(); + let total = std::env::var("VT_SHARD_TOTAL").ok(); + match (index, total) { + (None, None) => None, + (Some(i), Some(t)) => { + let index: usize = i.parse().expect("VT_SHARD_INDEX must be a positive integer"); + let total: usize = t.parse().expect("VT_SHARD_TOTAL must be a positive integer"); + assert!(total > 0, "VT_SHARD_TOTAL must be > 0"); + assert!( + (1..=total).contains(&index), + "VT_SHARD_INDEX must be in 1..={total}, got {index}" + ); + Some((index, total)) + } + _ => panic!("VT_SHARD_INDEX and VT_SHARD_TOTAL must both be set or both unset"), + } +} + #[expect(clippy::disallowed_types, reason = "Path required for CARGO_MANIFEST_DIR path traversal")] fn main() { + // Bypass for the non-e2e Windows shard: the workspace-wide `cargo test` + // still launches this binary, but we exit immediately so it pays nothing + // beyond process startup. + if std::env::var_os("VT_SKIP_E2E").is_some() { + return; + } + let tmp_dir = tempfile::tempdir().unwrap(); let tmp_dir_path = AbsolutePathBuf::new(tmp_dir.path().canonicalize().unwrap()).unwrap(); @@ -576,6 +605,8 @@ fn main() { args.test_threads = Some(1); } + let shard = parse_shard_env(); + let tests: Vec = fixture_paths .into_iter() .flat_map(|fixture_path| { @@ -626,5 +657,15 @@ fn main() { }) .collect(); + let tests = match shard { + Some((index, total)) => tests + .into_iter() + .enumerate() + .filter(|(i, _)| i % total + 1 == index) + .map(|(_, t)| t) + .collect(), + None => tests, + }; + libtest_mimic::run(&args, tests).exit(); } From 6ece7695bba7560f869c99b15eb6f44c1fb9f6b5 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 24 May 2026 18:46:50 +0000 Subject: [PATCH 2/6] ci(test): switch shard partition from round-robin to contiguous chunks Round-robin (i % total) scattered consecutive trials across shards, so a fixture's cases would land in N different shards. Contiguous chunks (i * total / count) keep neighbours together: a fixture's cases stay in one shard unless the fixture straddles a shard boundary, and even then only at the boundary. Same 32/31/31/31/31 distribution for 156 trials, same disjoint+exhaustive guarantees, but locality is preserved. --- crates/vite_task_bin/tests/e2e_snapshots/main.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/crates/vite_task_bin/tests/e2e_snapshots/main.rs b/crates/vite_task_bin/tests/e2e_snapshots/main.rs index 4193e505..d6af055e 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/main.rs +++ b/crates/vite_task_bin/tests/e2e_snapshots/main.rs @@ -658,12 +658,15 @@ fn main() { .collect(); let tests = match shard { - Some((index, total)) => tests - .into_iter() - .enumerate() - .filter(|(i, _)| i % total + 1 == index) - .map(|(_, t)| t) - .collect(), + Some((index, total)) => { + let count = tests.len(); + tests + .into_iter() + .enumerate() + .filter(|(i, _)| i * total / count + 1 == index) + .map(|(_, t)| t) + .collect() + } None => tests, }; From 126160336b1dee856248aad3d6b84ad7ee00b578 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 24 May 2026 18:51:57 +0000 Subject: [PATCH 3/6] ci(test): drop VT_SKIP_E2E in favour of --exclude vite_task_bin The non-e2e Windows shard previously set VT_SKIP_E2E=1 so the e2e harness could self-skip, but vite_task_bin has no lib tests, so excluding the whole crate via cargo's --exclude flag is equivalent and lets us skip compiling the e2e binary on that shard too. --- .github/workflows/ci.yml | 8 ++++---- crates/vite_task_bin/tests/e2e_snapshots/main.rs | 7 ------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bc61c33..b5cf5f04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,8 +96,8 @@ jobs: run_env: '' # Windows e2e fixtures dominate wall-clock (60s per PTY step vs 20s on # Unix). Sharded 5 ways at the trial level by the e2e harness via - # VT_SHARD_INDEX/VT_SHARD_TOTAL; the non-e2e shard self-skips the e2e - # binary via VT_SKIP_E2E and runs everything else. + # VT_SHARD_INDEX/VT_SHARD_TOTAL; the non-e2e shard excludes the + # vite_task_bin crate (which has no lib tests) and runs everything else. - os: windows-latest target: x86_64-pc-windows-msvc cargo_cmd: cargo @@ -138,8 +138,8 @@ jobs: cargo_cmd: cargo build_target: x86_64-pc-windows-msvc shard: windows-non-e2e - scope: '' - run_env: 'VT_SKIP_E2E=1' + scope: '--workspace --exclude vite_task_bin' + run_env: '' runs-on: ${{ matrix.os }} steps: - uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2 diff --git a/crates/vite_task_bin/tests/e2e_snapshots/main.rs b/crates/vite_task_bin/tests/e2e_snapshots/main.rs index d6af055e..2de54930 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/main.rs +++ b/crates/vite_task_bin/tests/e2e_snapshots/main.rs @@ -571,13 +571,6 @@ fn parse_shard_env() -> Option<(usize, usize)> { #[expect(clippy::disallowed_types, reason = "Path required for CARGO_MANIFEST_DIR path traversal")] fn main() { - // Bypass for the non-e2e Windows shard: the workspace-wide `cargo test` - // still launches this binary, but we exit immediately so it pays nothing - // beyond process startup. - if std::env::var_os("VT_SKIP_E2E").is_some() { - return; - } - let tmp_dir = tempfile::tempdir().unwrap(); let tmp_dir_path = AbsolutePathBuf::new(tmp_dir.path().canonicalize().unwrap()).unwrap(); From a1be974f4f5eb6a8ccb5770ea168e9bfae3bb87c Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 24 May 2026 19:00:45 +0000 Subject: [PATCH 4/6] ci(test): restore VT_SKIP_E2E so non-e2e scope is --workspace Reverts the previous switch to --exclude vite_task_bin. That exclusion happened to be equivalent today (vite_task_bin has no lib/bin/doc tests), but it isn't verifiable from the scope alone: adding a lib test to vite_task_bin later would silently drop it from CI. The non-e2e Windows shard now scopes to the full workspace and the e2e harness self-skips when VT_SKIP_E2E is set. Coverage is now legible from the scopes: e2e_snapshots is sharded across 5 jobs, --workspace catches everything else (current and future). --- .github/workflows/ci.yml | 9 +++++---- crates/vite_task_bin/tests/e2e_snapshots/main.rs | 7 +++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5cf5f04..5410bfde 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,8 +96,9 @@ jobs: run_env: '' # Windows e2e fixtures dominate wall-clock (60s per PTY step vs 20s on # Unix). Sharded 5 ways at the trial level by the e2e harness via - # VT_SHARD_INDEX/VT_SHARD_TOTAL; the non-e2e shard excludes the - # vite_task_bin crate (which has no lib tests) and runs everything else. + # VT_SHARD_INDEX/VT_SHARD_TOTAL. The non-e2e shard uses --workspace + # (self-evidently covers everything) and relies on VT_SKIP_E2E in the + # e2e harness to suppress the already-sharded work. - os: windows-latest target: x86_64-pc-windows-msvc cargo_cmd: cargo @@ -138,8 +139,8 @@ jobs: cargo_cmd: cargo build_target: x86_64-pc-windows-msvc shard: windows-non-e2e - scope: '--workspace --exclude vite_task_bin' - run_env: '' + scope: '' + run_env: 'VT_SKIP_E2E=1' runs-on: ${{ matrix.os }} steps: - uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2 diff --git a/crates/vite_task_bin/tests/e2e_snapshots/main.rs b/crates/vite_task_bin/tests/e2e_snapshots/main.rs index 2de54930..e1c66c51 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/main.rs +++ b/crates/vite_task_bin/tests/e2e_snapshots/main.rs @@ -571,6 +571,13 @@ fn parse_shard_env() -> Option<(usize, usize)> { #[expect(clippy::disallowed_types, reason = "Path required for CARGO_MANIFEST_DIR path traversal")] fn main() { + // Bypass for the non-e2e Windows shard: cargo still launches this binary + // as part of `cargo test --workspace`, but the e2e cases are sharded by + // the windows-e2e-* jobs, so we exit immediately. + if std::env::var_os("VT_SKIP_E2E").is_some() { + return; + } + let tmp_dir = tempfile::tempdir().unwrap(); let tmp_dir_path = AbsolutePathBuf::new(tmp_dir.path().canonicalize().unwrap()).unwrap(); From 79b7b855c00d97080c20143c3b39e94a13cb2a49 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 24 May 2026 19:07:40 +0000 Subject: [PATCH 5/6] ci(test): keep coverage in scope, drop VT_SKIP_E2E The non-e2e Windows scope is now `--workspace --exclude vite_task_bin` and the e2e scope stays `-p vite_task_bin --test e2e_snapshots`. Together they cover the whole workspace, looking only at the scope fields. The risk that --exclude vite_task_bin silently drops future tests is closed by tightening vite_task_bin's Cargo.toml: lib/doc were already test=false, and the two [[bin]] entries now set test=false too. A comment on [[test]] flags that adding another test target there would escape CI, so any future contributor has to either update the workflow or add the test to a different crate. --- .github/workflows/ci.yml | 12 +++++++----- crates/vite_task_bin/Cargo.toml | 9 +++++++++ crates/vite_task_bin/tests/e2e_snapshots/main.rs | 7 ------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5410bfde..f85c61c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,9 +96,11 @@ jobs: run_env: '' # Windows e2e fixtures dominate wall-clock (60s per PTY step vs 20s on # Unix). Sharded 5 ways at the trial level by the e2e harness via - # VT_SHARD_INDEX/VT_SHARD_TOTAL. The non-e2e shard uses --workspace - # (self-evidently covers everything) and relies on VT_SKIP_E2E in the - # e2e harness to suppress the already-sharded work. + # VT_SHARD_INDEX/VT_SHARD_TOTAL. Coverage is partitioned by scope: + # the e2e shards select only `-p vite_task_bin --test e2e_snapshots`, + # and the non-e2e shard runs `--workspace --exclude vite_task_bin`. + # vite_task_bin's Cargo.toml disables lib/doc/bin tests so the only + # test in the excluded crate is e2e_snapshots itself. - os: windows-latest target: x86_64-pc-windows-msvc cargo_cmd: cargo @@ -139,8 +141,8 @@ jobs: cargo_cmd: cargo build_target: x86_64-pc-windows-msvc shard: windows-non-e2e - scope: '' - run_env: 'VT_SKIP_E2E=1' + scope: '--workspace --exclude vite_task_bin' + run_env: '' runs-on: ${{ matrix.os }} steps: - uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2 diff --git a/crates/vite_task_bin/Cargo.toml b/crates/vite_task_bin/Cargo.toml index b8a8b8d8..1c450cbb 100644 --- a/crates/vite_task_bin/Cargo.toml +++ b/crates/vite_task_bin/Cargo.toml @@ -10,10 +10,15 @@ rust-version.workspace = true [[bin]] name = "vt" path = "src/main.rs" +# This crate is excluded from CI's non-e2e Windows shard via +# `cargo test --workspace --exclude vite_task_bin`, so any unit tests +# here would be silently dropped. Keep them out. +test = false [[bin]] name = "vtt" path = "src/vtt/main.rs" +test = false [dependencies] anyhow = { workspace = true } @@ -58,6 +63,10 @@ ignored = ["preload_test_lib"] [lints] workspace = true +# Only one [[test]] should live in this crate. CI shards the e2e +# binary across 5 Windows jobs and runs `--workspace --exclude +# vite_task_bin` everywhere else, so any additional [[test]] here +# would be silently dropped from non-Windows-e2e jobs. [[test]] name = "e2e_snapshots" harness = false diff --git a/crates/vite_task_bin/tests/e2e_snapshots/main.rs b/crates/vite_task_bin/tests/e2e_snapshots/main.rs index e1c66c51..2de54930 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/main.rs +++ b/crates/vite_task_bin/tests/e2e_snapshots/main.rs @@ -571,13 +571,6 @@ fn parse_shard_env() -> Option<(usize, usize)> { #[expect(clippy::disallowed_types, reason = "Path required for CARGO_MANIFEST_DIR path traversal")] fn main() { - // Bypass for the non-e2e Windows shard: cargo still launches this binary - // as part of `cargo test --workspace`, but the e2e cases are sharded by - // the windows-e2e-* jobs, so we exit immediately. - if std::env::var_os("VT_SKIP_E2E").is_some() { - return; - } - let tmp_dir = tempfile::tempdir().unwrap(); let tmp_dir_path = AbsolutePathBuf::new(tmp_dir.path().canonicalize().unwrap()).unwrap(); From 9355d823257bf0c2afd156612d0e78c5035e8baf Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 24 May 2026 19:16:55 +0000 Subject: [PATCH 6/6] ci(test): partition shards by crate so coverage is provable from scope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two scopes are now `-p vite_task_bin` (e2e shards) and `--workspace --exclude vite_task_bin` (non-e2e). Their union is the workspace by definition, so coverage of every test target follows from the scope fields alone without inspecting Cargo.toml or the harness. Reverts the [[bin]] test=false / [[test]] caveat comments added to lock down vite_task_bin's test surface — they're no longer load-bearing since any future test in the crate is automatically picked up by the e2e shards. Such a test would run on all 5 shards until it opts into VT_SHARD_INDEX/VT_SHARD_TOTAL, but it's covered. --- .github/workflows/ci.yml | 21 ++++++++++----------- crates/vite_task_bin/Cargo.toml | 9 --------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f85c61c7..31af714a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,46 +95,45 @@ jobs: scope: '' run_env: '' # Windows e2e fixtures dominate wall-clock (60s per PTY step vs 20s on - # Unix). Sharded 5 ways at the trial level by the e2e harness via - # VT_SHARD_INDEX/VT_SHARD_TOTAL. Coverage is partitioned by scope: - # the e2e shards select only `-p vite_task_bin --test e2e_snapshots`, - # and the non-e2e shard runs `--workspace --exclude vite_task_bin`. - # vite_task_bin's Cargo.toml disables lib/doc/bin tests so the only - # test in the excluded crate is e2e_snapshots itself. + # Unix). Coverage is partitioned by crate: the e2e shards run + # `-p vite_task_bin` and the non-e2e shard runs + # `--workspace --exclude vite_task_bin`; the union is the workspace + # by construction. The e2e_snapshots harness self-shards via + # VT_SHARD_INDEX/VT_SHARD_TOTAL across the 5 e2e jobs. - os: windows-latest target: x86_64-pc-windows-msvc cargo_cmd: cargo build_target: x86_64-pc-windows-msvc shard: windows-e2e-1 - scope: '-p vite_task_bin --test e2e_snapshots' + scope: '-p vite_task_bin' run_env: 'VT_SHARD_INDEX=1 VT_SHARD_TOTAL=5' - os: windows-latest target: x86_64-pc-windows-msvc cargo_cmd: cargo build_target: x86_64-pc-windows-msvc shard: windows-e2e-2 - scope: '-p vite_task_bin --test e2e_snapshots' + scope: '-p vite_task_bin' run_env: 'VT_SHARD_INDEX=2 VT_SHARD_TOTAL=5' - os: windows-latest target: x86_64-pc-windows-msvc cargo_cmd: cargo build_target: x86_64-pc-windows-msvc shard: windows-e2e-3 - scope: '-p vite_task_bin --test e2e_snapshots' + scope: '-p vite_task_bin' run_env: 'VT_SHARD_INDEX=3 VT_SHARD_TOTAL=5' - os: windows-latest target: x86_64-pc-windows-msvc cargo_cmd: cargo build_target: x86_64-pc-windows-msvc shard: windows-e2e-4 - scope: '-p vite_task_bin --test e2e_snapshots' + scope: '-p vite_task_bin' run_env: 'VT_SHARD_INDEX=4 VT_SHARD_TOTAL=5' - os: windows-latest target: x86_64-pc-windows-msvc cargo_cmd: cargo build_target: x86_64-pc-windows-msvc shard: windows-e2e-5 - scope: '-p vite_task_bin --test e2e_snapshots' + scope: '-p vite_task_bin' run_env: 'VT_SHARD_INDEX=5 VT_SHARD_TOTAL=5' - os: windows-latest target: x86_64-pc-windows-msvc diff --git a/crates/vite_task_bin/Cargo.toml b/crates/vite_task_bin/Cargo.toml index 1c450cbb..b8a8b8d8 100644 --- a/crates/vite_task_bin/Cargo.toml +++ b/crates/vite_task_bin/Cargo.toml @@ -10,15 +10,10 @@ rust-version.workspace = true [[bin]] name = "vt" path = "src/main.rs" -# This crate is excluded from CI's non-e2e Windows shard via -# `cargo test --workspace --exclude vite_task_bin`, so any unit tests -# here would be silently dropped. Keep them out. -test = false [[bin]] name = "vtt" path = "src/vtt/main.rs" -test = false [dependencies] anyhow = { workspace = true } @@ -63,10 +58,6 @@ ignored = ["preload_test_lib"] [lints] workspace = true -# Only one [[test]] should live in this crate. CI shards the e2e -# binary across 5 Windows jobs and runs `--workspace --exclude -# vite_task_bin` everywhere else, so any additional [[test]] here -# would be silently dropped from non-Windows-e2e jobs. [[test]] name = "e2e_snapshots" harness = false