-
-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (31 loc) · 1.03 KB
/
Copy pathcoverage.yml
File metadata and controls
37 lines (31 loc) · 1.03 KB
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
name: coverage
on: [push]
jobs:
test:
name: coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Cache cargo
uses: actions/cache@v6
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo
- name: Cache cargo build
uses: actions/cache@v6
with:
path: target
key: ${{ runner.os }}-stable-coverage-build-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-stable-coverage-build-target-
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload to codecov.io
uses: codecov/codecov-action@v7
with:
files: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}