File tree Expand file tree Collapse file tree 3 files changed +19
-12
lines changed Expand file tree Collapse file tree 3 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 43
43
- name : Setup Rust Toolchain
44
44
uses : actions-rust-lang/setup-rust-toolchain@v1
45
45
with :
46
- components : nextest
46
+ toolchain : stable
47
+ - name : Install nextest
48
+ run : cargo install cargo-nextest --locked
49
+ - name : Cache Rust dependencies
50
+ uses : Swatinem/rust-cache@v2
51
+ with :
52
+ cache-all-crates : ' true'
47
53
- name : Cargo Nextest
48
54
run : cargo nextest run --all-features --workspace
49
55
lint :
Original file line number Diff line number Diff line change @@ -202,10 +202,18 @@ impl StandardWorkflow {
202
202
/// Creates the "Build and Test" job for the workflow.
203
203
fn test_job ( & self ) -> Job {
204
204
self . init_job ( "Build and Test" )
205
- . add_step ( match self . test_runner {
206
- TestRunner :: Cargo => Toolchain :: default ( ) ,
207
- TestRunner :: Nextest => Toolchain :: default ( ) . add_nextest ( ) ,
208
- } )
205
+ . add_step ( Toolchain :: default ( ) . add_stable ( ) )
206
+ . add_step_when (
207
+ matches ! ( self . test_runner, TestRunner :: Nextest ) ,
208
+ Cargo :: new ( "install" )
209
+ . args ( "cargo-nextest --locked" )
210
+ . name ( "Install nextest" ) ,
211
+ )
212
+ . add_step (
213
+ Step :: uses ( "Swatinem" , "rust-cache" , "v2" )
214
+ . name ( "Cache Rust dependencies" )
215
+ . add_with ( ( "cache-all-crates" , "true" ) ) ,
216
+ )
209
217
. add_step ( match self . test_runner {
210
218
TestRunner :: Cargo => Cargo :: new ( "test" )
211
219
. args ( "--all-features --workspace" )
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ pub enum Component {
35
35
Clippy ,
36
36
Rustfmt ,
37
37
RustDoc ,
38
- Nextest ,
39
38
}
40
39
41
40
impl Display for Component {
@@ -44,7 +43,6 @@ impl Display for Component {
44
43
Component :: Clippy => "clippy" ,
45
44
Component :: Rustfmt => "rustfmt" ,
46
45
Component :: RustDoc => "rust-doc" ,
47
- Component :: Nextest => "nextest" ,
48
46
} ;
49
47
write ! ( f, "{val}" )
50
48
}
@@ -174,11 +172,6 @@ impl Toolchain {
174
172
self
175
173
}
176
174
177
- pub fn add_nextest ( mut self ) -> Self {
178
- self . components . push ( Component :: Nextest ) ;
179
- self
180
- }
181
-
182
175
pub fn add_nightly ( mut self ) -> Self {
183
176
self . toolchain . push ( Version :: Nightly ) ;
184
177
self
You can’t perform that action at this time.
0 commit comments