-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.74 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
on:
push:
#branches: [main]
pull_request:
branches:
- main
name: Test coverage
jobs:
coverage:
name: Collect test coverage
runs-on: ubuntu-latest
env:
#RUSTFLAGS: -D warnings
AFF_TEST_DATA_PW: ${{ secrets.AFF_TEST_DATA_PW }}
CARGO_TERM_COLOR: always
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Git LFS Pull
run: git lfs pull
- name: Create LFS file list
run: git lfs ls-files --long | cut -d ' ' -f1 | sort > .lfs-assets-id
- name: LFS Cache
uses: actions/cache@v3
with:
path: .git/lfs/objects
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
restore-keys: |
${{ runner.os }}-lfs-
- name: ls checkout
run: ls tests/test-data
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2
- name: Install latest nextest release
uses: taiki-e/install-action@af5d802f13195cc3a6becf3d19d72f7de93908d8 # v2
with:
tool: nextest
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@af5d802f13195cc3a6becf3d19d72f7de93908d8 # v2
with:
tool: cargo-llvm-cov
- name: Collect coverage data
run: |
cargo llvm-cov --no-report nextest
cargo llvm-cov report --lcov --output-path lcov.info
- name: Upload coverage data to codecov
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info