From 11a4d97cf50dc827f87d58cd783ecafc2864b1cd Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Wed, 24 Aug 2022 09:59:50 +0200 Subject: [PATCH] Use a job matrix to further split and deduplicate the test CI job. --- .github/workflows/test.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 177834b99..434a3bf3a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,6 +45,15 @@ jobs: runs-on: ubuntu-latest + strategy: + matrix: + features: [ + { label: "all", flags: "mmap,brotli-compression,lz4-compression,snappy-compression,zstd-compression,failpoints" }, + { label: "quickwit", flags: "mmap,quickwit,failpoints" } + ] + + name: test-${{ matrix.features.label}} + steps: - uses: actions/checkout@v3 @@ -58,17 +67,8 @@ jobs: - uses: taiki-e/install-action@nextest - uses: Swatinem/rust-cache@v2 - - name: Build - run: cargo build --verbose --workspace - - name: Run tests - run: cargo +stable nextest run --features mmap,brotli-compression,lz4-compression,snappy-compression,zstd-compression,failpoints --verbose --workspace + run: cargo +stable nextest run --features ${{ matrix.features.flags }} --verbose --workspace - name: Run doctests - run: cargo +stable test --doc --features mmap,brotli-compression,lz4-compression,snappy-compression,zstd-compression,failpoints --verbose --workspace - - - name: Run tests quickwit feature - run: cargo +stable nextest run --features mmap,quickwit,failpoints --verbose --workspace - - - name: Run doctests quickwit feature - run: cargo +stable test --doc --features mmap,quickwit,failpoints --verbose --workspace + run: cargo +stable test --doc --features ${{ matrix.features.flags }} --verbose --workspace