mirror of
https://github.com/logos-messaging/logos-messaging-rust-bindings.git
synced 2026-01-05 23:43:11 +00:00
codecov.yml avoid cache
This commit is contained in:
parent
592b312d02
commit
ba67be7ba2
22
.github/workflows/codecov.yml
vendored
22
.github/workflows/codecov.yml
vendored
@ -15,38 +15,28 @@ jobs:
|
|||||||
LLVM_PROFILE_FILE: "coverage-%p-%m.profraw"
|
LLVM_PROFILE_FILE: "coverage-%p-%m.profraw"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# 1️⃣ Checkout the repo
|
# Checkout the repo
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# 2️⃣ Install Rust toolchain (nightly required for coverage)
|
# Install Rust toolchain (nightly required for coverage)
|
||||||
- name: Set up Rust
|
- name: Set up Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
components: llvm-tools-preview
|
components: llvm-tools-preview
|
||||||
|
|
||||||
# 3️⃣ Cache build artifacts for faster CI
|
# Build and test with coverage instrumentation
|
||||||
- name: Cache cargo build
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
# 4️⃣ Build and test with coverage instrumentation
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
cargo build --all-features
|
cargo build --all-features
|
||||||
cargo test --all-features
|
cargo test --all-features
|
||||||
|
|
||||||
# 5️⃣ Install grcov
|
# Install grcov
|
||||||
- name: Install grcov
|
- name: Install grcov
|
||||||
run: cargo install grcov
|
run: cargo install grcov
|
||||||
|
|
||||||
# 6️⃣ Generate lcov report
|
# Generate lcov report
|
||||||
- name: Generate coverage report
|
- name: Generate coverage report
|
||||||
run: |
|
run: |
|
||||||
mkdir -p coverage
|
mkdir -p coverage
|
||||||
@ -60,7 +50,7 @@ jobs:
|
|||||||
--ignore "/*" \
|
--ignore "/*" \
|
||||||
-o coverage/tests.lcov
|
-o coverage/tests.lcov
|
||||||
|
|
||||||
# 7️⃣ Upload to Codecov
|
# Upload to Codecov
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v4
|
uses: codecov/codecov-action@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user