-
Notifications
You must be signed in to change notification settings - Fork 0
143 lines (110 loc) · 3.12 KB
/
ci.yaml
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: CI
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Rust Format Check
run: cargo fmt --verbose --check --all
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Clippy Checks
run: cargo clippy --verbose --workspace --tests -- -D warnings
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rust Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --verbose --workspace
- name: Run Tests
run: cargo test --verbose --workspace
- name: Run Ignored (Slow) Tests
run: cargo test --verbose --workspace -- --ignored
doc:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rust-docs
- name: Build docs
env:
RUSTDOCFLAGS: "-Dwarnings"
run: cargo doc --verbose --workspace --document-private-items
docs-rs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rust Nightly Toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Install cargo-docs-rs
uses: dtolnay/install@cargo-docs-rs
- name: Build docs as docs.rs does
run: cargo docs-rs --verbose
spellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Typos
uses: crate-ci/[email protected]
msrv:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install cargo-binstall
uses: taiki-e/install-action@v2
with:
tool: cargo-binstall
- name: Install cargo-msrv
run: cargo binstall --version 0.16.0-beta.20 --no-confirm cargo-msrv
- name: Verify MSRV
run: cargo msrv verify
minimal-versions:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rust Nightly Toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Install cargo-minimal-versions
uses: taiki-e/install-action@v2
with:
tool: cargo-hack,cargo-minimal-versions
- name: Check Minimal Versions of Dependencies
run: cargo minimal-versions check --workspace
- name: Test Minimal Versions of Dependencies
run: cargo minimal-versions test --workspace
semver-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2