-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coverage: introduce coverage with llvm-cov
- Loading branch information
1 parent
53fc9d9
commit 44ccdb9
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
jobs: | ||
coverage: | ||
name: Coverage | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: -D warnings | ||
CARGO_TERM_COLOR: always | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: llvm-tools-preview | ||
|
||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: nextest | ||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-llvm-cov | ||
|
||
- name: Collect coverage | ||
run: | | ||
cargo llvm-cov --no-report nextest | ||
cargo llvm-cov report --lcov --output-path lcov.info | ||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: lcov.info | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
fail_ci_if_error: false |