-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 1.64 KB
/
Copy pathcoverage.yml
File metadata and controls
66 lines (54 loc) · 1.64 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
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
66
name: Coverage
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
rust-coverage:
name: Rust line coverage (>= 80%)
runs-on: ubuntu-24.04
timeout-minutes: 90
steps:
- name: Checkout ArgosFS
uses: actions/checkout@v7
- name: Checkout pjdfstest
uses: actions/checkout@v7
with:
repository: pjd/pjdfstest
ref: ededbeb2b44929972898afb87474b0937f78a877
path: external/pjdfstest
- name: Install system dependencies
run: scripts/ci/install-deps.sh
- name: Install Rust toolchain
run: scripts/ci/install-rust.sh stable
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov --version 0.8.7 --locked
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
key: rust-coverage
- name: Prepare FUSE
run: |
sudo modprobe fuse || true
test -c /dev/fuse
sudo chmod 0666 /dev/fuse
sudo sh -c 'grep -qxF user_allow_other /etc/fuse.conf 2>/dev/null || printf "%s\n" user_allow_other >>/etc/fuse.conf'
- name: Enforce line coverage
env:
ARGOSFS_COVERAGE_REQUIRE_FUSE: "1"
ARGOSFS_COVERAGE_MIN_LINES: "80"
PJDFSTEST_ROOT: ${{ github.workspace }}/external/pjdfstest
run: scripts/ci/run-coverage.sh
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v7
with:
name: argosfs-coverage
path: target/coverage
if-no-files-found: warn