Skip to content

Commit d7b75cb

Browse files
committed
add llvm-cov to template ci
move this into the raw block
1 parent 2efef7c commit d7b75cb

File tree

1 file changed

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

1 file changed

+21
-0
lines changed

template/.github/workflows/ci.yml

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

0 commit comments

Comments
 (0)