Skip to content

Commit 885c6c1

Browse files
authored
Add more Caching (#18)
resolves #17
1 parent dc3e375 commit 885c6c1

File tree

5 files changed

+45
-0
lines changed

5 files changed

+45
-0
lines changed

.github/workflows/docs.yml

+9
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ jobs:
1313
name: 📄 Build docs
1414
runs-on: ubuntu-latest
1515
steps:
16+
- uses: actions/cache@v3
17+
with:
18+
path: |
19+
~/.cargo/bin/
20+
~/.cargo/registry/index/
21+
~/.cargo/registry/cache/
22+
~/.cargo/git/db/
23+
target/
24+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
1625
- uses: actions/checkout@v2
1726
- name: Build docs
1827
run: cargo doc --verbose

.github/workflows/format.yml

+9
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ jobs:
1313
name: 👔 Check formatting
1414
runs-on: ubuntu-latest
1515
steps:
16+
- uses: actions/cache@v3
17+
with:
18+
path: |
19+
~/.cargo/bin/
20+
~/.cargo/registry/index/
21+
~/.cargo/registry/cache/
22+
~/.cargo/git/db/
23+
target/
24+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
1625
- uses: actions/checkout@v2
1726
- name: Check Formatting
1827
run: cargo fmt -- --verbose --check --color auto

.github/workflows/lint.yml

+9
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ jobs:
1313
name: 🖋 Check linting
1414
runs-on: ubuntu-latest
1515
steps:
16+
- uses: actions/cache@v3
17+
with:
18+
path: |
19+
~/.cargo/bin/
20+
~/.cargo/registry/index/
21+
~/.cargo/registry/cache/
22+
~/.cargo/git/db/
23+
target/
24+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
1625
- uses: actions/checkout@v2
1726
- name: Check linting
1827
run: |

.github/workflows/package.yml

+9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v2
17+
- uses: actions/cache@v3
18+
with:
19+
path: |
20+
~/.cargo/bin/
21+
~/.cargo/registry/index/
22+
~/.cargo/registry/cache/
23+
~/.cargo/git/db/
24+
target/
25+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
1726
- name: Check license
1827
run: |
1928
cargo install cargo-deny

.github/workflows/tests.yml

+9
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ jobs:
2222
uses: actions-rs/toolchain@v1
2323
with:
2424
toolchain: ${{ matrix.toolchain }}
25+
- uses: actions/cache@v3
26+
with:
27+
path: |
28+
~/.cargo/bin/
29+
~/.cargo/registry/index/
30+
~/.cargo/registry/cache/
31+
~/.cargo/git/db/
32+
target/
33+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2534
- uses: actions/checkout@v2
2635
- name: Run tests
2736
run: cargo test --verbose

0 commit comments

Comments
 (0)