From 2ae383e4528f3a87da1c2f53db5ac9d380ff88f1 Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Tue, 23 Aug 2022 23:27:29 +0200 Subject: [PATCH] Cache dependencies in CI to speed up build times. (#1469) * Cache dependencies in CI to speed up build times. * Give cargo-nextest a try. --- .github/workflows/coverage.yml | 1 + .github/workflows/test.yml | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 6f106e8fb..f70d3e04e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,6 +13,7 @@ jobs: - uses: actions/checkout@v3 - name: Install Rust run: rustup toolchain install nightly --component llvm-tools-preview + - uses: Swatinem/rust-cache@v2 - uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage run: cargo +nightly llvm-cov --all-features --workspace --lcov --output-path lcov.info diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 01af35195..ffe69e204 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,14 +30,23 @@ jobs: override: true components: rustfmt, clippy + - uses: taiki-e/install-action@nextest + - uses: Swatinem/rust-cache@v2 + - name: Build run: cargo build --verbose --workspace - name: Run tests - run: cargo +stable test --features mmap,brotli-compression,lz4-compression,snappy-compression,zstd-compression,failpoints --verbose --workspace + run: cargo +stable nextest run --features mmap,brotli-compression,lz4-compression,snappy-compression,zstd-compression,failpoints --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 test --features mmap,quickwit,failpoints --verbose --workspace + 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 - name: Check Formatting run: cargo +nightly fmt --all -- --check