Skip to content

Commit 16279a8

Browse files
committed
Revert "chore: use toolchain to setup cargo nextest"
This reverts commit 2775e39.
1 parent 2775e39 commit 16279a8

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ jobs:
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:

crates/gh-workflow-tailcall/src/standard.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff 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")

crates/gh-workflow/src/toolchain.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ pub enum Component {
3535
Clippy,
3636
Rustfmt,
3737
RustDoc,
38-
Nextest,
3938
}
4039

4140
impl 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

0 commit comments

Comments
 (0)