From b6caa1c377adc598c99dc148d706dff11b1c11a4 Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Thu, 2 May 2024 20:12:43 -0700 Subject: [PATCH] ci: Run unit tests on multiple feature sets --- .github/workflows/ci.yaml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e50a61df..b441c409 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,6 +21,7 @@ jobs: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] rustalias: [stable, nightly, msrv] + feature_flag: ["--all-features", "--no-default-features", ""] include: - rustalias: stable rust: stable @@ -28,7 +29,7 @@ jobs: rust: '1.70' - rustalias: nightly rust: nightly - name: 'Build and test: ${{ matrix.os }}, ${{ matrix.rustalias }}' + name: 'Build and test ${{ matrix.feature_flag }}: ${{ matrix.os }}, ${{ matrix.rustalias }}' runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@master @@ -43,19 +44,13 @@ jobs: uses: actions-rs/cargo@v1 with: command: check - args: --all --bins --examples + args: --all ${{ matrix.feature_flag }} --bins --examples - name: Tests uses: actions-rs/cargo@v1 with: command: test - args: --all - - - name: Tests (no features) - uses: actions-rs/cargo@v1 - with: - command: test - args: --all --no-default-features + args: --all ${{ matrix.feature_flag }} style_and_docs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name