Skip to content

Commit c29499e

Browse files
committed
feat(ci): add caching for Rust dependencies in CI workflow
1 parent 68e525f commit c29499e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ jobs:
4646
toolchain: stable
4747
- name: Install nextest
4848
run: cargo install cargo-nextest --locked
49+
- name: Cache Rust dependencies
50+
uses: Swatinem/rust-cache@v2
51+
with:
52+
cache-all-crates: 'true'
4953
- name: Cargo Nextest
5054
run: cargo nextest run --all-features --workspace
5155
lint:

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ impl StandardWorkflow {
209209
.args("cargo-nextest --locked")
210210
.name("Install nextest"),
211211
)
212+
.add_step(
213+
Step::uses("Swatinem", "rust-cache", "v2")
214+
.name("Cache Rust dependencies")
215+
.add_with(("cache-all-crates", "true")),
216+
)
212217
.add_step(match self.test_runner {
213218
TestRunner::Cargo => Cargo::new("test")
214219
.args("--all-features --workspace")

0 commit comments

Comments
 (0)