From 284db290a1bc32f7ff22a9fdc0058d05160cd79f Mon Sep 17 00:00:00 2001 From: Mattis Kieffer <62772198+mat-kie@users.noreply.github.com> Date: Thu, 28 Nov 2024 16:24:22 +0100 Subject: [PATCH] Update rust.yml, enable caching, disable some steps for now --- .github/workflows/rust.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 896b684..098a8f7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,6 +17,17 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 + - name: Cache Cargo + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + - name: Set up Rust uses: actions-rs/toolchain@v1 with: @@ -38,12 +49,12 @@ jobs: run: cargo build --release - name: Upload Build Artifacts - if: always() + if: never() uses: actions/upload-artifact@v3 with: name: hrv-rs-build path: target/release/ - + - name: Install cargo-tarpaulin run: cargo install cargo-tarpaulin @@ -52,15 +63,16 @@ jobs: env: RUSTFLAGS: "-C link-dead-code" # Required for accurate coverage analysis - - name: Upload Coverage Report - uses: actions/upload-artifact@v3 + - name: Upload coverage reports to Codecov + if: never() + uses: codecov/codecov-action@v5 with: - name: coverage-report - path: tarpaulin-report.xml + token: ${{ secrets.CODECOV_TOKEN }} - name: Upload to Codecov + if: never() uses: codecov/codecov-action@v3 with: files: tarpaulin-report.xml fail_ci_if_error: true - flags: unittests \ No newline at end of file + flags: unittests