Add github action for llvm-cov coverage

The action reports the generated report to coveralls.
This commit is contained in:
pool2win 2024-01-19 10:53:52 +01:00
parent aa1fc35b1b
commit 50ff68550c
No known key found for this signature in database
GPG Key ID: 0060648A0DD5CA9A
1 changed files with 24 additions and 0 deletions

24
.github/workflows/coveralls.yml vendored Normal file
View File

@ -0,0 +1,24 @@
on:
- push
- pull_request
name: Code coverage with llvm-cov
jobs:
Coveralls:
name: Code coverage - stable toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout Crate
uses: actions/checkout@v4
- name: Checkout Toolchain
# https://github.com/dtolnay/rust-toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage for tests
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload report to coveralls
uses: coverallsapp/github-action@v2