Skip to content

Commit 34f5437

Browse files
cpuchifflier
authored andcommitted
ci: use feature matrix for cargo test
Adopts a similar feature matrix approach as the asn1-rs CI. `cargo test` will be run for no default features, default features, and all features. It doesn't seem worthwhile in this case to test various individual features. The asn1-rs matrix differs only by having a separate "no std" job that uses `--no-default-features`. Since this crate doesn't offer a std feature we roll this step into the same matrix as the other feature configs.
1 parent 435a1fb commit 34f5437

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/rust.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,17 @@ jobs:
2929
test:
3030
name: Test Suite
3131
runs-on: ubuntu-latest
32+
strategy:
33+
matrix:
34+
features:
35+
- --no-default-features
36+
- --features=default
37+
- --all-features
3238
steps:
3339
- uses: actions/checkout@v4
34-
- uses: dtolnay/rust-toolchain@stable
35-
- run: cargo test
36-
- run: cargo test --all-features
37-
- run: cargo test --no-default-features
40+
- name: Install stable toolchain
41+
uses: dtolnay/rust-toolchain@stable
42+
- run: cargo test ${{ matrix.features }}
3843

3944
fmt:
4045
name: Rustfmt

0 commit comments

Comments
 (0)