Skip to content

Commit 9ce9a2a

Browse files
authored
Create rust-coverage.yml
1 parent 14e148f commit 9ce9a2a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Coverage
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
coverage:
7+
runs-on: ubuntu-latest
8+
env:
9+
CARGO_TERM_COLOR: always
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Install Rust
13+
run: rustup update stable
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 --workspace --lcov --output-path lcov.info
18+
- name: Upload coverage to Codecov
19+
uses: codecov/codecov-action@v3
20+
with:
21+
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
22+
files: lcov.info
23+
fail_ci_if_error: true

0 commit comments

Comments
 (0)