-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (34 loc) · 1.07 KB
/
coverage.yml
File metadata and controls
40 lines (34 loc) · 1.07 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
38
39
40
name: Coverage (Push)
on:
push:
branches: ['**'] # all branches, including main
permissions:
contents: read
actions: write
jobs:
coverage-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache llvm-cov build
id: cache-llvm-cov
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-llvm-cov-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-llvm-cov
- run: which cargo-llvm-cov || cargo install cargo-llvm-cov
- run: rustup component add llvm-tools-preview
- run: cargo llvm-cov --workspace --lcov --output-path lcov.info --ignore-filename-regex '^examples/'
- name: Upload branch coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-lcov
path: lcov.info
retention-days: 21