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, all features, and a selection of
individual features. The existing no-std step covers
--no-default-features.
  • Loading branch information
cpu authored and chifflier committed Apr 15, 2024
1 parent 7ebac9b commit 2e08bbe
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,22 @@ jobs:
run: cargo update
- run: cargo check

test:
name: Test Suite
test_features:
name: Test suite (with features)
runs-on: ubuntu-latest
strategy:
matrix:
features:
- --features=default
- --features=bigint
- --features=serialize
- --features=unstable
- --all-features
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- run: cargo test ${{ matrix.features }}

no_std:
name: no-std
Expand Down

0 comments on commit 2e08bbe

Please sign in to comment.