Commit e613113
ci(test): shard Windows e2e_snapshots into 5 parallel jobs (#398)
## Summary
**Half the CI time** by sharing Windows e2e_snapshots
Windows is the long pole of CI: per-step PTY timeout is 60s on Windows
vs 20s on Unix, and `vite_task_bin` e2e fixtures expand to 156 trials
that run serially inside a single job. Linux/macOS finish well before
Windows on every PR.
This PR shards only the Windows `e2e_snapshots` test binary 5 ways while
leaving every other platform (Linux GNU, macOS arm64, macOS x64, musl)
untouched.
## Approach
- `crates/vite_task_bin/tests/e2e_snapshots/main.rs` reads two new env
vars:
- `VT_SHARD_INDEX` (1..=total) + `VT_SHARD_TOTAL` → round-robin
partition the generated `Vec<Trial>` at the **case** level (not the
fixture level), so heavy fixtures' cases split across shards.
- `VT_SKIP_E2E=1` → early-return from `main` so the sibling non-e2e
Windows job can run the full workspace `cargo test` while this binary
self-skips.
- Local sanity check: 156 trials split 32/31/31/31/31, union = full
list, no duplicates.
## CI matrix
Was 4 entries → now 9: 3 non-Windows (unchanged) + 6 Windows (5 e2e
shards + 1 non-e2e). All entries run the same three `cargo test`
commands, parameterized by per-shard `scope` and `run_env` matrix fields
— single source of truth, no per-shard branching in the steps.
| shard kind | scope | run_env |
| ---------- | --------------------------------------- |
----------------------------------- |
| non-Windows| *(empty)* | *(empty)* |
| `e2e-N` | `-p vite_task_bin --test e2e_snapshots` | `VT_SHARD_INDEX=N
VT_SHARD_TOTAL=5` |
| `non-e2e` | *(empty)* | `VT_SKIP_E2E=1` |
## Test plan
- [ ] CI runs all 9 `test` matrix entries successfully on this PR
- [ ] One Windows e2e shard log shows ~31 trials executed
- [ ] `windows-non-e2e` log runs plan_snapshots + fspy + unit tests,
with e2e_snapshots reporting no work
- [ ] Linux/macOS/musl jobs unchanged in timing and behaviour
- [ ] Slowest Windows e2e shard wall-clock is meaningfully shorter than
the previous monolithic Windows test job
Will monitor CI timings after first run and adjust shard count or
strategy if balance is poor.
---
_Generated by [Claude
Code](https://claude.ai/code/session_017U5JHuUmN8NrcZcoD2mZhE)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 884df0c commit e613113
2 files changed
Lines changed: 98 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
92 | 145 | | |
93 | 146 | | |
94 | 147 | | |
| |||
124 | 177 | | |
125 | 178 | | |
126 | 179 | | |
127 | | - | |
| 180 | + | |
128 | 181 | | |
129 | 182 | | |
130 | 183 | | |
131 | 184 | | |
132 | 185 | | |
133 | | - | |
| 186 | + | |
134 | 187 | | |
135 | 188 | | |
136 | 189 | | |
| |||
139 | 192 | | |
140 | 193 | | |
141 | 194 | | |
142 | | - | |
| 195 | + | |
143 | 196 | | |
144 | 197 | | |
145 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
550 | 572 | | |
551 | 573 | | |
552 | 574 | | |
| |||
576 | 598 | | |
577 | 599 | | |
578 | 600 | | |
| 601 | + | |
| 602 | + | |
579 | 603 | | |
580 | 604 | | |
581 | 605 | | |
| |||
626 | 650 | | |
627 | 651 | | |
628 | 652 | | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
629 | 666 | | |
630 | 667 | | |
0 commit comments