use cargo hack in CI to test all feature combinations

This commit is contained in:
KodrAus 2025-01-10 20:47:43 +10:00
parent e6b643d591
commit b1824f2c28
2 changed files with 4 additions and 12 deletions

View File

@ -39,16 +39,8 @@ jobs:
run: | run: |
rustup update ${{ matrix.rust }} --no-self-update rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }} rustup default ${{ matrix.rust }}
- run: cargo test --verbose cargo install cargo-hack
- run: cargo test --verbose --no-default-features - run: cargo hack test --feature-powerset --lib --exclude-features max_level_off,max_level_error,max_level_warn,max_level_info,max_level_debug,max_level_trace,release_max_level_off,release_max_level_error,release_max_level_warn,release_max_level_info,release_max_level_debug,release_max_level_trace
- run: cargo test --verbose --features std,serde,sval,sval_ref,value-bag,kv,kv_std,kv_sval,kv_serde
- run: cargo test --verbose --features serde
- run: cargo test --verbose --features std
- run: cargo test --verbose --features kv
- run: cargo test --verbose --features kv_sval
- run: cargo test --verbose --features kv_serde
- run: cargo test --verbose --features kv,std
- run: cargo test --verbose --features "kv kv_std kv_sval kv_serde"
- run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml - run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml
- run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml --release - run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml --release

View File

@ -44,11 +44,11 @@ release_max_level_info = []
release_max_level_debug = [] release_max_level_debug = []
release_max_level_trace = [] release_max_level_trace = []
std = [] std = ["value-bag?/error"]
kv = [] kv = []
kv_sval = ["kv", "value-bag/sval", "sval", "sval_ref"] kv_sval = ["kv", "value-bag/sval", "sval", "sval_ref"]
kv_std = ["std", "kv", "value-bag/error"] kv_std = ["std", "kv"]
kv_serde = ["kv_std", "value-bag/serde", "serde"] kv_serde = ["kv_std", "value-bag/serde", "serde"]
# Deprecated: use `kv_*` instead # Deprecated: use `kv_*` instead