@@ -18,18 +18,27 @@ jobs:
18
18
- windows-latest
19
19
steps :
20
20
- name : Checkout sources
21
- uses : actions/checkout@v2
21
+ uses : actions/checkout@v4
22
22
23
- - name : Install toolchain
24
- uses : actions-rs/ toolchain@v1
23
+ - name : Install Rust
24
+ uses : dtolnay/rust- toolchain@master
25
25
with :
26
26
toolchain : ${{ matrix.rust }}
27
- override : true
28
27
29
- - name : Run cargo check
30
- uses : actions-rs/cargo@v1
28
+ - name : Setup Cache
29
+ uses : actions/cache@v4
31
30
with :
32
- command : check
31
+ path : |
32
+ ~/.cargo/bin/
33
+ ~/.cargo/registry/index/
34
+ ~/.cargo/registry/cache/
35
+ ~/.cargo/git/db/
36
+ target/
37
+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ matrix.rust }}
38
+
39
+ - name : Run cargo check
40
+ run : cargo check
41
+ shell : bash
33
42
34
43
test :
35
44
needs : [check]
@@ -47,18 +56,27 @@ jobs:
47
56
- windows-latest
48
57
steps :
49
58
- name : Checkout sources
50
- uses : actions/checkout@v2
59
+ uses : actions/checkout@v4
51
60
52
- - name : Install toolchain
53
- uses : actions-rs/ toolchain@v1
61
+ - name : Install Rust
62
+ uses : dtolnay/rust- toolchain@master
54
63
with :
55
64
toolchain : ${{ matrix.rust }}
56
- override : true
57
65
58
- - name : Run cargo test
59
- uses : actions-rs/cargo@v1
66
+ - name : Setup Cache
67
+ uses : actions/cache@v4
60
68
with :
61
- command : test
69
+ path : |
70
+ ~/.cargo/bin/
71
+ ~/.cargo/registry/index/
72
+ ~/.cargo/registry/cache/
73
+ ~/.cargo/git/db/
74
+ target/
75
+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ matrix.rust }}
76
+
77
+ - name : Run cargo test
78
+ run : cargo test
79
+ shell : bash
62
80
63
81
clippy :
64
82
needs : [check]
@@ -72,19 +90,25 @@ jobs:
72
90
- nightly
73
91
steps :
74
92
- name : Checkout sources
75
- uses : actions/checkout@v2
93
+ uses : actions/checkout@v4
76
94
77
- - name : Install toolchain
78
- uses : actions-rs/ toolchain@v1
95
+ - name : Install Rust
96
+ uses : dtolnay/rust- toolchain@master
79
97
with :
80
98
toolchain : ${{ matrix.rust }}
81
- override : true
99
+ components : clippy
82
100
83
- - name : Install clippy
84
- run : rustup component add clippy
101
+ - name : Setup Cache
102
+ uses : actions/cache@v4
103
+ with :
104
+ path : |
105
+ ~/.cargo/bin/
106
+ ~/.cargo/registry/index/
107
+ ~/.cargo/registry/cache/
108
+ ~/.cargo/git/db/
109
+ target/
110
+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ matrix.rust }}
85
111
86
112
- name : Run cargo clippy
87
- uses : actions-rs/cargo@v1
88
- with :
89
- command : clippy
90
- args : -- -D warnings
113
+ run : cargo clippy -- -D warnings
114
+ shell : bash
0 commit comments