-
Notifications
You must be signed in to change notification settings - Fork 6
37 lines (30 loc) · 879 Bytes
/
Copy pathcoverage.yml
File metadata and controls
37 lines (30 loc) · 879 Bytes
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 (llvm-cov → Codecov)
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
workspaces: . -> target
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov --locked
- name: Generate coverage (LCOV)
run: cargo llvm-cov --all-features --lcov --output-path lcov.info --fail-under-lines 60
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
files: ./lcov.info
flags: unittests
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}