ci(coverage): generate using cargo-llvm-cov
This commit is contained in:
@@ -5,37 +5,36 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tarpaulin:
|
coverage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
shell: bash -eux {0}
|
shell: bash -eux {0}
|
||||||
run: |
|
run: |
|
||||||
rustup toolchain install stable --profile minimal
|
rustup toolchain install stable --profile minimal --component llvm-tools-preview
|
||||||
rustup default stable
|
rustup default stable
|
||||||
|
|
||||||
- name: Install cargo-tarpaulin
|
- name: Install cargo-llvm-cov
|
||||||
uses: taiki-e/install-action@v2
|
uses: taiki-e/install-action@v2
|
||||||
with:
|
with:
|
||||||
tool: cargo-tarpaulin
|
tool: cargo-llvm-cov
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
key: tarpaulin-${{ hashFiles('**/Cargo.lock') }}
|
key: coverage-${{ hashFiles('**/Cargo.lock') }}
|
||||||
restore-keys: tarpaulin-
|
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
|
|
||||||
- name: Run cargo-tarpaulin
|
- name: Run cargo-llvm-cov
|
||||||
run: cargo tarpaulin --all-features --out Html
|
run: cargo llvm-cov --all-features --html
|
||||||
|
|
||||||
- name: Upload Report
|
- name: Upload Report
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: report
|
name: coverage-report
|
||||||
path: tarpaulin-report.html
|
path: target/llvm-cov/html
|
||||||
|
|||||||
Reference in New Issue
Block a user