Skip to content

Commit 1e9197d

Browse files
committed
add llvm-cov to template ci
1 parent 2efef7c commit 1e9197d

File tree

1 file changed

+20
-0
lines changed
  • template/.github/workflows

1 file changed

+20
-0
lines changed

template/.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,23 @@ jobs:
6262
RUSTDOCFLAGS: -D warnings
6363
run: cargo doc --no-deps --document-private-items --all-features --workspace --examples
6464
{% endraw %}
65+
66+
coverage:
67+
name: Coverage
68+
runs-on: ubuntu-latest
69+
steps:
70+
- name: Checkout repository
71+
uses: actions/checkout@v4
72+
- name: Install Rust toolchain
73+
uses: dtolnay/rust-toolchain@stable
74+
- uses: Swatinem/rust-cache@v2
75+
- name: Install cargo-llvm-cov
76+
uses: taiki-e/install-action@cargo-llvm-cov
77+
- name: Generate code coverage
78+
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
79+
- name: Upload coverage to Codecov
80+
uses: codecov/codecov-action@v3
81+
with:
82+
token: ${{ secrets.CODECOV_TOKEN }}
83+
files: lcov.info
84+
fail_ci_if_error: true

0 commit comments

Comments
 (0)