Skip to content

Commit 9a385d8

Browse files
committed
cache crates on ci
1 parent fe5655d commit 9a385d8

1 file changed

Lines changed: 14 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,27 @@ jobs:
2222
toolchain: 1.88.0
2323
components: rustfmt, clippy
2424

25-
- name: Cache cargo registry
25+
- name: Cache cargo dependencies
2626
uses: actions/cache@v4
2727
with:
28-
path: ~/.cargo/registry
29-
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
30-
31-
- name: Cache cargo index
32-
uses: actions/cache@v4
33-
with:
34-
path: ~/.cargo/git
35-
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
36-
37-
- name: Cache cargo build
38-
uses: actions/cache@v4
39-
with:
40-
path: target
41-
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
28+
path: |
29+
~/.cargo/bin/
30+
~/.cargo/registry/index/
31+
~/.cargo/registry/cache/
32+
~/.cargo/git/db/
33+
target/
34+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-cargo-
37+
38+
- name: Download dependencies
39+
run: cargo fetch --locked
4240

4341
- name: Check formatting
4442
run: cargo fmt -- --check
4543

4644
- name: Run clippy
47-
run: cargo clippy -- -D warnings
45+
run: cargo clippy --all-targets --all-features -- -D warnings
4846

4947
- name: Run tests
5048
run: cargo test --verbose

0 commit comments

Comments
 (0)