mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-02 20:18:38 -05:00
CI: run only the test shards a pull request's changes reach
The gate call sets select-tests and shard-members, so a pull request runs the test shards whose crates its changes reach (the crates that own or declare a read of a changed file, and every crate that depends on them) and always runs shard 6, the checks. Pushes to main, the nightly run and the full-ci label run all six shards. xtask's test ci_names_the_crates_of_every_shard_for_test_selection fails when the shard-members lines in ci.yml differ from GROUPS in xtask/src/shards.rs.
This commit is contained in:
1 parent
dcdbd3cc1b
commit
308befa8cf
2 files changed
+40
-1
No files matched your search
@@ -47,6 +47,19 @@ jobs:
|
||||
test-shards: 6
|
||||
shard-command: cargo xtask ci shard
|
||||
warm-command: cargo xtask ci warm
|
||||
# A pull request runs only the test shards whose crates its changes reach: the crates that
|
||||
# own a changed file or declare a read of it (`[package.metadata.craft] reads`), and every
|
||||
# crate that depends on them. Shard 6 runs on every event. The `select legs` log lists the
|
||||
# shards left out and why; pushes to main, the nightly run and the `full-ci` label run all
|
||||
# six. `shard-members` names each shard's crates, as xtask/src/shards.rs › GROUPS does.
|
||||
select-tests: true
|
||||
shard-members: |
|
||||
vectorcraft-ui-egui
|
||||
vectorcraft-ui-egui
|
||||
vectorcraft-engine
|
||||
vectorcraft vectorcraft-web vectorcraft-cli vectorcraft-mcp xtask
|
||||
(rest)
|
||||
(always)
|
||||
# The dependency cache also keeps the compiled workspace crates and test executables, so a
|
||||
# pull request's shards rebuild only the crates its changes reach. Each main run's `cache
|
||||
# warm` leg saves a rolling entry of its own, every leg restores the newest one, and
|
||||
|
||||
Reference in new issue
Block a user