Skip to content

Commit

Permalink
Update rust.yml, enable caching, disable some steps for now
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-kie authored Nov 28, 2024
1 parent 0cd259b commit 284db29
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand All @@ -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
flags: unittests

0 comments on commit 284db29

Please sign in to comment.