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 4343 - name : Setup Rust Toolchain
4444 uses : actions-rust-lang/setup-rust-toolchain@v1
4545 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'
4753 - name : Cargo Nextest
4854 run : cargo nextest run --all-features --workspace
4955 lint :
Original file line number Diff line number Diff line change @@ -202,10 +202,18 @@ impl StandardWorkflow {
202202 /// Creates the "Build and Test" job for the workflow.
203203 fn test_job ( & self ) -> Job {
204204 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+ )
209217 . add_step ( match self . test_runner {
210218 TestRunner :: Cargo => Cargo :: new ( "test" )
211219 . args ( "--all-features --workspace" )
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ pub enum Component {
3535 Clippy ,
3636 Rustfmt ,
3737 RustDoc ,
38- Nextest ,
3938}
4039
4140impl Display for Component {
@@ -44,7 +43,6 @@ impl Display for Component {
4443 Component :: Clippy => "clippy" ,
4544 Component :: Rustfmt => "rustfmt" ,
4645 Component :: RustDoc => "rust-doc" ,
47- Component :: Nextest => "nextest" ,
4846 } ;
4947 write ! ( f, "{val}" )
5048 }
@@ -174,11 +172,6 @@ impl Toolchain {
174172 self
175173 }
176174
177- pub fn add_nextest ( mut self ) -> Self {
178- self . components . push ( Component :: Nextest ) ;
179- self
180- }
181-
182175 pub fn add_nightly ( mut self ) -> Self {
183176 self . toolchain . push ( Version :: Nightly ) ;
184177 self
You can’t perform that action at this time.
0 commit comments