-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (55 loc) · 1.53 KB
/
ci.yml
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
on: push
jobs:
check:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: ⬇️ checkout repository
uses: actions/checkout@v3
- name: 🛠 setup cargo toolchain
uses: dtolnay/rust-toolchain@stable
- name: ♻️ cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ matrix.os }}
- name: ✅ run cargo check
run: |
cargo check
cargo check --all-features
test:
needs: check
runs-on: ubuntu-latest
steps:
- name: ⬇️ checkout repository
uses: actions/checkout@v3
- name: 🛠 setup cargo toolchain
uses: dtolnay/rust-toolchain@stable
- name: ♻️ cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: ubuntu-latest
- name: 🛟 run cargo test
run: |
cargo test
cargo test --all-features --doc
lint:
needs: test
runs-on: ubuntu-latest
steps:
- name: ⬇️ checkout repository
uses: actions/checkout@v3
- name: 🛠 setup cargo toolchain
uses: dtolnay/rust-toolchain@stable
- name: ♻️ cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: ubuntu-latest
- name: 🔍 run cargo clippy
run: |
cargo clippy --all-features
- name: 🎨 run cargo fmt
run: |
cargo fmt --all --check