-
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (58 loc) · 1.54 KB
/
Copy pathtest.yml
File metadata and controls
75 lines (58 loc) · 1.54 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
69
70
71
72
73
74
75
name: Test
on:
workflow_call:
inputs:
ref:
required: false
type: string
default: ""
permissions:
contents: read
jobs:
container:
name: Container
runs-on: ubuntu-latest
timeout-minutes: 30
container:
image: rust:1.89-bookworm
steps:
- uses: actions/checkout@v7
name: Checkout Code
with:
ref: ${{ inputs.ref || github.ref }}
- name: Install Git
run: |
apt-get update
apt-get install --no-install-recommends --yes git
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- run: cargo install cargo-llvm-cov
name: Install Coverage Tool
- run: CARGO_BUILD_JOBS=4 cargo llvm-cov --fail-under-lines 80 --workspace --locked
name: Run Tests and Coverage
native:
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
label: Ubuntu
- os: macos-latest
label: macOS
- os: windows-latest
label: Windows
steps:
- uses: actions/checkout@v7
name: Checkout Code
with:
ref: ${{ inputs.ref || github.ref }}
- uses: dtolnay/rust-toolchain@stable
name: Install Rust Toolchain
- uses: Swatinem/rust-cache@v2
name: Cache Cargo
- run: cargo test --workspace --locked
env:
CARGO_BUILD_JOBS: "4"
name: Run Workspace Tests