10
10
env :
11
11
CARGO_TERM_COLOR : always
12
12
13
-
14
-
15
13
jobs :
16
14
format :
17
15
name : Check code formatting
20
18
- name : Checkout repository
21
19
uses : actions/checkout@v4
22
20
23
- - name : Restore cargo cache
24
- uses : actions/cache@v3
25
- with :
26
- path : |
27
- ~/.cargo/registry
28
- ~/.cargo/git
29
- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
30
- restore-keys : |
31
- ${{ runner.os }}-cargo-
32
-
33
21
- name : Install Rust nightly
34
22
uses : dtolnay/rust-toolchain@nightly
35
23
59
47
- name : Install Rust nightly
60
48
uses : dtolnay/rust-toolchain@nightly
61
49
50
+ - name : Install clippy
51
+ run : rustup component add clippy
52
+
62
53
- name : Run Clippy
63
- run : cargo clippy -- -Dwarnings -Dclippy::all
54
+ run : cargo clippy --all-targets -- -Dwarnings
64
55
65
56
security :
66
57
name : Check for security vulnerabilities
@@ -69,24 +60,14 @@ jobs:
69
60
- name : Checkout repository
70
61
uses : actions/checkout@v4
71
62
72
- - name : Restore cargo cache
73
- uses : actions/cache@v3
74
- with :
75
- path : |
76
- ~/.cargo/registry
77
- ~/.cargo/git
78
- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
79
- restore-keys : |
80
- ${{ runner.os }}-cargo-
81
-
82
63
- name : Install Rust nightly
83
64
uses : dtolnay/rust-toolchain@nightly
84
65
85
- - name : Install cargo- audit
66
+ - name : Install audit
86
67
run : cargo install cargo-audit
87
68
88
69
- name : Run cargo audit
89
- run : cargo audit
70
+ run : cargo install cargo-audit && cargo audit
90
71
91
72
build :
92
73
name : Build project
105
86
- name : Checkout repository
106
87
uses : actions/checkout@v4
107
88
108
- - name : Restore cargo and target cache
89
+ - name : Cache dependencies
109
90
uses : actions/cache@v3
110
91
with :
111
92
path : |
@@ -141,7 +122,7 @@ jobs:
141
122
- name : Checkout repository
142
123
uses : actions/checkout@v4
143
124
144
- - name : Restore cargo and target cache
125
+ - name : Cache dependencies
145
126
uses : actions/cache@v3
146
127
with :
147
128
path : |
@@ -158,4 +139,4 @@ jobs:
158
139
targets : ${{ matrix.target }}
159
140
160
141
- name : Run tests
161
- run : cargo test --target ${{ matrix.target }} --verbose
142
+ run : cargo test --target ${{ matrix.target }} --verbose
0 commit comments