Skip to content

Commit

Permalink
ci: use feature matrix for cargo test
Browse files Browse the repository at this point in the history
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.

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.
  • Loading branch information
cpu authored and chifflier committed Apr 12, 2024
1 parent f454d83 commit bccce2d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
features:
- --no-default-features
- --features=default
- --all-features
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test
- run: cargo test --all-features
- run: cargo test --no-default-features
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- run: cargo test ${{ matrix.features }}

fmt:
name: Rustfmt
Expand Down

0 comments on commit bccce2d

Please sign in to comment.