ci: add cache-workspaces test

This commit is contained in:
Rob Ede 2024-01-13 17:25:41 +00:00
parent f2e9ed58bd
commit 922cc935eb
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
4 changed files with 45 additions and 0 deletions

View File

@ -70,3 +70,20 @@ jobs:
- run: cargo add serde_as
- run: cargo clippy
cache:
name: Cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: toolchain
name: Install Rust
uses: ./
with:
components: clippy
cache: true
cache-workspaces: |-
./test-workspace
- run: cargo clippy

16
test-workspace/Cargo.lock generated Normal file
View File

@ -0,0 +1,16 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "ci"
version = "0.1.0"
dependencies = [
"serde_as",
]
[[package]]
name = "serde_as"
version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ee4afe4c5c3b69699c4267ae42b838e911466d7ca0005046adc93ac95bb16dd"

View File

@ -0,0 +1,9 @@
[package]
name = "ci"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
serde_as = "0.0.1"

View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}