Replace test-all-features with a manual CI matrix (#419)

Made the rust CI pipeline use a matrix instead of test-all-features
Removed beta and nightly from the test pipelines, made the check pipeline check on --all-features
This commit is contained in:
Trangar 2021-10-25 11:19:46 +02:00 committed by GitHub
parent e81665bbea
commit b30805dde2
1 changed files with 25 additions and 23 deletions

View File

@ -4,7 +4,6 @@
"push": { "push": {
"branches": [ "branches": [
"trunk", "trunk",
"feature/deserde*", # Temporary while we work on deserde
"v*.x" "v*.x"
] ]
}, },
@ -47,20 +46,19 @@
{ {
"uses": "actions-rs/cargo@v1", "uses": "actions-rs/cargo@v1",
"with": { "with": {
"command": "check" "command": "check",
"args": "--all-features"
}, },
"name": "Run `cargo check`" "name": "Run `cargo check`"
},
{
"uses": "actions-rs/cargo@v1",
"with": {
"command": "check",
"args": "--examples"
},
"name": "Check examples"
} }
# ,
# {
# "uses": "actions-rs/cargo@v1",
# "with": {
# "command": "check",
# "args": "--examples"
# },
# "name": "Check examples",
# "if": "matrix.rust != '1.41.0'"
# }
] ]
}, },
"test": { "test": {
@ -70,9 +68,16 @@
"matrix": { "matrix": {
"rust": [ "rust": [
"stable", "stable",
"beta",
"nightly"
# "1.55.0" TODO: Pick latest stable version when we release 2.0 # "1.55.0" TODO: Pick latest stable version when we release 2.0
],
"features": [
"",
"alloc",
"alloc,derive",
"std",
"std,derive",
"serde",
"serde,derive"
] ]
} }
}, },
@ -91,15 +96,12 @@
"name": "Install Rust ${{ matrix.rust }}" "name": "Install Rust ${{ matrix.rust }}"
}, },
{ {
"uses": "actions-rs/install@v0.1", "run": "if [ -z \"${{ matrix.features }}\" ]\n
"with": { then\n
"crate": "cargo-all-features", cargo test --no-default-features\n
"version": "1.6.0" else\n
}, cargo test --no-default-features --features ${{ matrix.features }}\n
"name": "Install cargo-all-features" fi",
},
{
"run": "cargo test-all-features",
"name": "Run `cargo test` on all features", "name": "Run `cargo test` on all features",
"env": { "env": {
"RUSTFLAGS": "-D warnings" "RUSTFLAGS": "-D warnings"