Skip to content

Commit 91c73b3

Browse files
committed
ci: add coverage
1 parent ef0e796 commit 91c73b3

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/rust-ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,25 @@ jobs:
6565
RUSTDOCFLAGS: -D warnings
6666
run: cargo doc --no-deps --document-private-items --all-features --examples
6767

68+
coverage:
69+
name: Coverage
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Checkout repository
73+
uses: actions/checkout@v4
74+
- name: Install Rust toolchain
75+
uses: dtolnay/rust-toolchain@stable
76+
- name: Install cargo-llvm-cov
77+
run: cargo install cargo-llvm-cov
78+
- name: Generate coverage report
79+
run: cargo llvm-cov --all-targets --lcov --output-path lcov.info
80+
- name: Upload to Codecov
81+
uses: codecov/codecov-action@v4
82+
with:
83+
files: lcov.info
84+
fail_ci_if_error: true
85+
token: ${{ secrets.CODECOV_TOKEN }}
86+
6887
publish-dry-run:
6988
name: Publish dry run
7089
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)