Skip to content

Commit 922cc93

Browse files
committed
ci: add cache-workspaces test
1 parent f2e9ed5 commit 922cc93

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,20 @@ jobs:
7070
- run: cargo add serde_as
7171

7272
- run: cargo clippy
73+
74+
cache:
75+
name: Cache
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@v4
79+
80+
- id: toolchain
81+
name: Install Rust
82+
uses: ./
83+
with:
84+
components: clippy
85+
cache: true
86+
cache-workspaces: |-
87+
./test-workspace
88+
89+
- run: cargo clippy

test-workspace/Cargo.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test-workspace/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[package]
2+
name = "ci"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]
9+
serde_as = "0.0.1"

test-workspace/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

0 commit comments

Comments
 (0)