From 2e08bbe1e72df33e26dd98af956a3e8d18c3a7dc Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Thu, 11 Apr 2024 20:36:06 -0400 Subject: [PATCH] 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, all features, and a selection of individual features. The existing no-std step covers --no-default-features. --- .github/workflows/rust.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 36f2169..8e7636e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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