-
Notifications
You must be signed in to change notification settings - Fork 21
40 lines (33 loc) · 898 Bytes
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Test Coverage
on:
push:
pull_request:
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
key: coverage-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Run cargo-llvm-cov
run: cargo llvm-cov --all-features --html
- name: Upload Report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: target/llvm-cov/html