Skip to content

Commit a1be974

Browse files
committed
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).
1 parent 1261603 commit a1be974

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

  • .github/workflows
  • crates/vite_task_bin/tests/e2e_snapshots

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ jobs:
9696
run_env: ''
9797
# Windows e2e fixtures dominate wall-clock (60s per PTY step vs 20s on
9898
# Unix). Sharded 5 ways at the trial level by the e2e harness via
99-
# VT_SHARD_INDEX/VT_SHARD_TOTAL; the non-e2e shard excludes the
100-
# vite_task_bin crate (which has no lib tests) and runs everything else.
99+
# VT_SHARD_INDEX/VT_SHARD_TOTAL. The non-e2e shard uses --workspace
100+
# (self-evidently covers everything) and relies on VT_SKIP_E2E in the
101+
# e2e harness to suppress the already-sharded work.
101102
- os: windows-latest
102103
target: x86_64-pc-windows-msvc
103104
cargo_cmd: cargo
@@ -138,8 +139,8 @@ jobs:
138139
cargo_cmd: cargo
139140
build_target: x86_64-pc-windows-msvc
140141
shard: windows-non-e2e
141-
scope: '--workspace --exclude vite_task_bin'
142-
run_env: ''
142+
scope: ''
143+
run_env: 'VT_SKIP_E2E=1'
143144
runs-on: ${{ matrix.os }}
144145
steps:
145146
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2

crates/vite_task_bin/tests/e2e_snapshots/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,13 @@ fn parse_shard_env() -> Option<(usize, usize)> {
571571

572572
#[expect(clippy::disallowed_types, reason = "Path required for CARGO_MANIFEST_DIR path traversal")]
573573
fn main() {
574+
// Bypass for the non-e2e Windows shard: cargo still launches this binary
575+
// as part of `cargo test --workspace`, but the e2e cases are sharded by
576+
// the windows-e2e-* jobs, so we exit immediately.
577+
if std::env::var_os("VT_SKIP_E2E").is_some() {
578+
return;
579+
}
580+
574581
let tmp_dir = tempfile::tempdir().unwrap();
575582
let tmp_dir_path = AbsolutePathBuf::new(tmp_dir.path().canonicalize().unwrap()).unwrap();
576583

0 commit comments

Comments
 (0)