chore(ci): switch to cargo-llvm-cov for code coverage (#260)

This commit is contained in:
Orhun Parmaksız 2024-03-08 16:17:42 +03:00 committed by GitHub
parent fa5105deab
commit c60a614258
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 5 deletions

View File

@ -30,15 +30,17 @@ jobs:
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Setup cargo-tarpaulin
uses: taiki-e/install-action@cargo-tarpaulin
- name: Run tests
run: cargo tarpaulin --out xml --verbose -- --test-threads 1
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --lcov --output-path lcov.info -- --test-threads 1
env:
OUT_DIR: target
- name: Upload reports to codecov
uses: codecov/codecov-action@v3
with:
name: code-coverage-report
file: cobertura.xml
file: lcov.info
flags: unit-tests
fail_ci_if_error: true
verbose: true