Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1b44aac

Browse files
committedSep 22, 2024·
test: add cache
1 parent 4695c0b commit 1b44aac

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
 

‎.github/workflows/test.yml

+36
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ jobs:
2323
toolchain: stable
2424
override: true
2525

26+
- name: Cache dependencies
27+
uses: actions/cache@v2
28+
with:
29+
path: |
30+
~/.cargo/bin/
31+
~/.cargo/registry/index/
32+
~/.cargo/registry/cache/
33+
~/.cargo/git/db/
34+
target/
35+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
36+
restore-keys: ${{ runner.os }}-cargo-
37+
2638
- name: Run cargo check
2739
uses: actions-rs/cargo@v1
2840
continue-on-error: true # WARNING: only for this example, remove it!
@@ -43,6 +55,18 @@ jobs:
4355
toolchain: stable
4456
override: true
4557

58+
- name: Cache dependencies
59+
uses: actions/cache@v2
60+
with:
61+
path: |
62+
~/.cargo/bin/
63+
~/.cargo/registry/index/
64+
~/.cargo/registry/cache/
65+
~/.cargo/git/db/
66+
target/
67+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
68+
restore-keys: ${{ runner.os }}-cargo-
69+
4670
- name: Run cargo test
4771
uses: actions-rs/cargo@v1
4872
continue-on-error: true # WARNING: only for this example, remove it!
@@ -64,6 +88,18 @@ jobs:
6488
override: true
6589
components: rustfmt, clippy
6690

91+
- name: Cache dependencies
92+
uses: actions/cache@v2
93+
with:
94+
path: |
95+
~/.cargo/bin/
96+
~/.cargo/registry/index/
97+
~/.cargo/registry/cache/
98+
~/.cargo/git/db/
99+
target/
100+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
101+
restore-keys: ${{ runner.os }}-cargo-
102+
67103
- name: Run cargo fmt
68104
uses: actions-rs/cargo@v1
69105
continue-on-error: true # WARNING: only for this example, remove it!

0 commit comments

Comments
 (0)
Please sign in to comment.