From fa59cdf79aa13de3934503767b77634ba9c267f1 Mon Sep 17 00:00:00 2001 From: Heemank Verma Date: Thu, 22 Aug 2024 16:00:49 +0530 Subject: [PATCH] update: Introduced Rust Cache (#93) Co-authored-by: Apoorv Sadana <95699312+apoorvsadana@users.noreply.github.com> --- .github/workflows/coverage.yml | 31 +++++++++++++++++++------------ CHANGELOG.md | 1 + 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 92598ab7..7f5d5776 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,5 +1,4 @@ ---- -name: Task - Rust Tests & Coverage +name: Rust Test & Coverage on: workflow_dispatch: @@ -7,7 +6,6 @@ on: jobs: coverage: - # sadly, for now we have to "rebuild" for the coverage runs-on: ubuntu-latest services: @@ -32,22 +30,31 @@ jobs: # before the plugin, as the cache uses the current rustc version as its cache key - run: rustup show - - uses: taiki-e/install-action@cargo-llvm-cov - - uses: taiki-e/install-action@nextest + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + + - name: Install cargo-llvm-cov & nextest + uses: taiki-e/install-action@cargo-llvm-cov + + - name: Install nextest + uses: taiki-e/install-action@nextest - name: Clean workspace run: | - cargo llvm-cov clean --workspace + cargo clean --doc - - name: Run llvm-cov - run: | - cargo llvm-cov nextest --release --lcov --output-path lcov.info --test-threads=1 + - name: Run tests llvm-cov + run: cargo llvm-cov nextest --release --lcov --output-path lcov.info --test-threads=1 - name: Coveralls uses: coverallsapp/github-action@v2 with: files: lcov.info debug: true - - - uses: colpal/actions-clean@v1 - if: ${{ always() }} # To ensure this step runs even when earlier steps fail diff --git a/CHANGELOG.md b/CHANGELOG.md index aa51be02..50c669f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## Added +- Added Rust Cache for Coverage Test CI. - support for fetching PIE file from storage client in proving job. - added coveralls support - moved mongodb serde behind feature flag