-
-
Notifications
You must be signed in to change notification settings - Fork 13
46 lines (36 loc) · 1.47 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
name: Coverage
on: [pull_request, push]
permissions:
contents: read
jobs:
coverage:
runs-on: ubuntu-24.04
env:
CARGO_TERM_COLOR: always
strategy:
matrix:
toolchain:
- stable
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Populate cache
uses: ./.github/workflows/cache
- run: sudo apt-get install -y squashfs-tools
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@e466aa8e34c40a13a9f613179665b838dd4c764c # cargo-llvm-cov
# generate release builds of the testable binaries
# this is meant to actually run the binary, so this will fail but the binary will be built
- run: cargo llvm-cov run --bin replace-backhand --no-clean --release || true
- run: cargo llvm-cov run --bin add-backhand --no-clean --release || true
- run: cargo llvm-cov run --bin unsquashfs-backhand --no-clean --release || true
# run coverage on tests
- run: cargo llvm-cov --workspace --codecov --output-path codecov.json --features __test_unsquashfs --release --no-clean -- --skip slow
- name: Upload coverage to Codecov
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: codecov.json
fail_ci_if_error: true