mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-01 02:35:37 +01:00
CI: declare the files each crate reads in other crates, for test selection
Test selection in the shared gate (`select-tests`) runs the tests of the crates a change reaches. A crate that compiles or reads another crate's files lists them under `[package.metadata.craft]` in its Cargo.toml: - vectorcraft-plugins sets `reads-every-member = true`, because `tests/grant_sites.rs` reads the sources of every crate. - vectorcraft-cli, vectorcraft-affinity, vectorcraft-engine, vectorcraft-mcp, vectorcraft-ui-egui and xtask list the files they compile through `#[path]` or read with `include_str!`/`include_bytes!` or from `CARGO_MANIFEST_DIR`. Cargo ignores this table. Only the gate's selection step reads it, and that step fails when a read is missing from it.
This commit is contained in:
1 parent
ad642cb34c
commit
dcdbd3cc1b
7 files changed
+42
No files matched your search
@@ -48,3 +48,14 @@ objc2-core-text = { version = "0.3", default-features = false, features = ["std"
|
||||
tempfile = "3"
|
||||
vectorcraft-testkit = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
# The files of other crates that this crate compiles or its tests read, for CI's test selection.
|
||||
[package.metadata.craft]
|
||||
reads = [
|
||||
"apps/vectorcraft/src/mac_fonts.rs",
|
||||
"apps/vectorcraft/src/prefs_dir.rs",
|
||||
"apps/vectorcraft/src/profile.rs",
|
||||
"apps/vectorcraft/src/system_fonts.rs",
|
||||
"apps/vectorcraft/src/windows_cores.rs",
|
||||
"crates/plugins/tests/fixtures/desaturate.wasm",
|
||||
]
|
||||
@@ -24,3 +24,7 @@ craft-image-codecs = { workspace = true }
|
||||
# tests/it's `import_limits`, `outline_limits` and `text` modules need `synth`, also when this crate
|
||||
# is tested without vectorcraft-engine (`cargo xtask ci shard`).
|
||||
vectorcraft-affinity = { path = ".", features = ["synth"] }
|
||||
|
||||
# The files of other crates that this crate's tests compile or read, for CI's test selection.
|
||||
[package.metadata.craft]
|
||||
reads = ["xtask/affinity-corpus.sha256", "xtask/src/sha256.rs"]
|
||||
@@ -143,3 +143,14 @@ ruzstd = { workspace = true }
|
||||
vectorcraft-js = { workspace = true }
|
||||
# A bundled font's own glyph boxes, for the glyph bounds tests.
|
||||
skrifa = { workspace = true }
|
||||
|
||||
# The files of other crates that this crate compiles or its tests read, for CI's test selection.
|
||||
[package.metadata.craft]
|
||||
reads = [
|
||||
"crates/affinity/tests/support/corpus.rs",
|
||||
"crates/affinity/tests/support/text_fixture.rs",
|
||||
"crates/apischema/src/conformance.rs",
|
||||
"crates/plugins/tests/fixtures/desaturate.wasm",
|
||||
"xtask/affinity-corpus.sha256",
|
||||
"xtask/src/sha256.rs",
|
||||
]
|
||||
@@ -33,3 +33,7 @@ craft-image-codecs = { workspace = true }
|
||||
vectorcraft-testkit = { workspace = true }
|
||||
proptest = { workspace = true }
|
||||
socket2 = { workspace = true }
|
||||
|
||||
# The files of other crates that this crate's tests compile, for CI's test selection.
|
||||
[package.metadata.craft]
|
||||
reads = ["crates/apischema/src/conformance.rs"]
|
||||
@@ -44,3 +44,7 @@ vectorcraft-plugins = { path = ".", features = ["test-steady"] }
|
||||
[features]
|
||||
# `vectorcraft_plugins::steady` for other crates' tests (dev-dependencies only).
|
||||
test-steady = []
|
||||
|
||||
# For CI's test selection: `tests/grant_sites.rs` reads the sources of every crate.
|
||||
[package.metadata.craft]
|
||||
reads-every-member = true
|
||||
@@ -109,3 +109,7 @@ wat = { workspace = true }
|
||||
[build-dependencies]
|
||||
serde_json = { workspace = true }
|
||||
toml = "1"
|
||||
|
||||
# The files of other crates that this crate's tests read, for CI's test selection.
|
||||
[package.metadata.craft]
|
||||
reads = ["crates/engine/src/cmd/addons/cutting/banner.rs", "crates/plugins/tests/fixtures/desaturate.wasm"]
|
||||
@@ -10,3 +10,7 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
serde_json = { workspace = true }
|
||||
|
||||
# The files of other crates that this crate compiles, for CI's test selection.
|
||||
[package.metadata.craft]
|
||||
reads = ["crates/text/build/web_fonts.rs"]
|
||||
Reference in new issue
Block a user