File tree Expand file tree Collapse file tree 3 files changed +12
-19
lines changed Expand file tree Collapse file tree 3 files changed +12
-19
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
- 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'
46
+ components : nextest
53
47
- name : Cargo Nextest
54
48
run : cargo nextest run --all-features --workspace
55
49
lint :
Original file line number Diff line number Diff line change @@ -202,18 +202,10 @@ 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 ( 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
- )
205
+ . add_step ( match self . test_runner {
206
+ TestRunner :: Cargo => Toolchain :: default ( ) ,
207
+ TestRunner :: Nextest => Toolchain :: default ( ) . add_nextest ( ) ,
208
+ } )
217
209
. add_step ( match self . test_runner {
218
210
TestRunner :: Cargo => Cargo :: new ( "test" )
219
211
. args ( "--all-features --workspace" )
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ pub enum Component {
35
35
Clippy ,
36
36
Rustfmt ,
37
37
RustDoc ,
38
+ Nextest ,
38
39
}
39
40
40
41
impl Display for Component {
@@ -43,6 +44,7 @@ impl Display for Component {
43
44
Component :: Clippy => "clippy" ,
44
45
Component :: Rustfmt => "rustfmt" ,
45
46
Component :: RustDoc => "rust-doc" ,
47
+ Component :: Nextest => "nextest" ,
46
48
} ;
47
49
write ! ( f, "{val}" )
48
50
}
@@ -172,6 +174,11 @@ impl Toolchain {
172
174
self
173
175
}
174
176
177
+ pub fn add_nextest ( mut self ) -> Self {
178
+ self . components . push ( Component :: Nextest ) ;
179
+ self
180
+ }
181
+
175
182
pub fn add_nightly ( mut self ) -> Self {
176
183
self . toolchain . push ( Version :: Nightly ) ;
177
184
self
You can’t perform that action at this time.
0 commit comments