10
10
CARGO_TERM_COLORS : always
11
11
12
12
jobs :
13
- test :
14
- name : Test
13
+ check :
14
+ name : Check
15
15
runs-on : ubuntu-latest
16
16
steps :
17
- - name : Checkout
18
- uses : actions/checkout@v3
19
- - name : Retrieve MSRV
20
- id : msrv
21
- run : echo "MSRV=$(cat Cargo.toml | grep -Po '(?<=rust-version = ")([\d\.]+)')" >> $GITHUB_OUTPUT
22
- - name : Install Rust
23
- uses : dtolnay/rust-toolchain@master
24
- with :
25
- toolchain : ${{ steps.msrv.outputs.MSRV }}
26
- - name : Build
27
- run : cargo build --all-features --verbose
28
- - name : Run tests
29
- run : cargo test --all-features --verbose
30
-
31
- lint :
32
- name : Lint
17
+ - name : Checkout sources
18
+ uses : actions/checkout@v4
19
+
20
+ - name : Install stable toolchain
21
+ uses : actions-rs/toolchain@v1
22
+ with :
23
+ profile : minimal
24
+ toolchain : stable
25
+ override : true
26
+
27
+ - name : Run cargo check
28
+ uses : actions-rs/cargo@v1
29
+ continue-on-error : false
30
+ with :
31
+ command : check
32
+
33
+ rustfmt :
34
+ name : Rustfmt
33
35
runs-on : ubuntu-latest
34
36
steps :
35
- - name : Checkout
36
- uses : actions/checkout@v2
37
- - name : Install Rust
38
- uses : dtolnay/rust- toolchain@stable
37
+ - name : Checkout repository
38
+ uses : actions/checkout@v4
39
+ - name : Install Rust toolchain
40
+ uses : actions-rs/ toolchain@v1
39
41
with :
42
+ toolchain : 1.85.0
43
+ profile : minimal
44
+ override : true
40
45
components : rustfmt
46
+ - uses : Swatinem/rust-cache@v2
41
47
- name : Check formatting
42
48
uses : actions-rs/cargo@v1
43
49
with :
44
50
command : fmt
45
51
args : --all -- --check
46
- - name : Clippy
52
+
53
+ clippy :
54
+ name : Clippy
55
+ runs-on : ubuntu-latest
56
+ steps :
57
+ - name : Checkout repository
58
+ uses : actions/checkout@v4
59
+ - name : Install Rust toolchain
60
+ uses : actions-rs/toolchain@v1
61
+ with :
62
+ toolchain : 1.85.0
63
+ profile : minimal
64
+ override : true
65
+ components : clippy
66
+ - uses : Swatinem/rust-cache@v2
67
+ - name : Clippy check
47
68
uses : actions-rs/cargo@v1
48
69
with :
49
70
command : clippy
50
- args : --all-features -- -D warnings
71
+ args : --all-targets --all-features --workspace -- -D warnings
72
+
73
+ test :
74
+ name : Test Suite
75
+ runs-on : ubuntu-latest
76
+ steps :
77
+ - name : Checkout sources
78
+ uses : actions/checkout@v4
79
+
80
+ - name : Install stable toolchain
81
+ uses : actions-rs/toolchain@v1
82
+ with :
83
+ profile : minimal
84
+ toolchain : stable
85
+ override : true
86
+
87
+ - name : Run cargo test
88
+ uses : actions-rs/cargo@v1
89
+ continue-on-error : false
90
+ with :
91
+ command : test
92
+ args : --all-features --verbose
0 commit comments