Skip to content

Commit 1e5b1c0

Browse files
committed
gh-action: Add coverage report
Use cargo-llvm-cov and Codecov Signed-off-by: Tim Zhang <tim@hyper.sh>
1 parent f63c6f6 commit 1e5b1c0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/cov.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Coverage
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
coverage:
7+
runs-on: ubuntu-latest
8+
env:
9+
CARGO_TERM_COLOR: always
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Install Rust
13+
run: rustup toolchain install stable --component llvm-tools-preview
14+
- name: Install cargo-llvm-cov
15+
uses: taiki-e/install-action@cargo-llvm-cov
16+
- name: Generate code coverage
17+
run: cargo llvm-cov --all-features --lcov --output-path lcov.info
18+
- name: Upload coverage to Codecov
19+
uses: codecov/codecov-action@v3
20+
with:
21+
files: lcov.info
22+
fail_ci_if_error: true

0 commit comments

Comments
 (0)