-
-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (51 loc) · 1.51 KB
/
Copy pathtest.yml
File metadata and controls
68 lines (51 loc) · 1.51 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
67
68
name: Test
on:
workflow_call:
inputs:
ref:
required: false
type: string
default: ""
permissions:
contents: read
jobs:
cli:
name: CLI
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v7
name: Checkout Code
with:
ref: ${{ inputs.ref || github.ref }}
- if: matrix.os == 'ubuntu-latest'
uses: dtolnay/rust-toolchain@stable
name: Install Rust Toolchain With Coverage Tools
with:
components: llvm-tools-preview
- if: matrix.os != 'ubuntu-latest'
uses: dtolnay/rust-toolchain@stable
name: Install Rust Toolchain
- uses: Swatinem/rust-cache@v2
name: Cache Cargo
- if: matrix.os == 'ubuntu-latest'
run: cargo install cargo-llvm-cov
name: Install cargo-llvm-cov
- if: matrix.os == 'ubuntu-latest'
run: CARGO_BUILD_JOBS=4 cargo llvm-cov --fail-under-lines 80 --workspace --html
name: Run Tests and Coverage
- if: matrix.os != 'ubuntu-latest'
run: cargo test --workspace --locked
name: Run Workspace Tests
env:
CARGO_BUILD_JOBS: 4
- if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v7
name: Upload Coverage Report
with:
name: gitfleet-coverage-${{ github.run_id }}
path: target/llvm-cov/