-
Notifications
You must be signed in to change notification settings - Fork 14
98 lines (81 loc) · 2.84 KB
/
Copy pathtests.yaml
File metadata and controls
98 lines (81 loc) · 2.84 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Tests
# ------------------------------------------------------------------------------
# Workflow Settings
# ------------------------------------------------------------------------------
on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions: {}
env:
CARGO_TERM_COLOR: always
NIGHTLY_RUSTFMT: nightly-2026-03-28
jobs:
# ----------------------------------------------------------------------------
# Lint (fmt + clippy + machete)
# ----------------------------------------------------------------------------
lint:
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install nightly rustfmt
run: rustup toolchain install "$NIGHTLY_RUSTFMT" --profile minimal --component rustfmt
- name: Install Rust
uses: dtolnay/rust-toolchain@6190aa5fb88a88ee71c12769924bbe63a9ab152e # 1.96.0
with:
components: clippy
- name: Cache Cargo registry and build artifacts
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: ${{ runner.os }}-rust-1.96.0-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-1.96.0-cargo-
save-always: true
- name: Install cargo-machete
run: cargo install cargo-machete --locked
- name: Lint
run: make lint
# ----------------------------------------------------------------------------
# Unit tests
# ----------------------------------------------------------------------------
test:
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@6190aa5fb88a88ee71c12769924bbe63a9ab152e # 1.96.0
- name: Cache Cargo registry and build artifacts
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: ${{ runner.os }}-rust-1.96.0-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-1.96.0-cargo-
save-always: true
- name: Unit tests
run: make test-unit