Skip to content

Commit 191e68c

Browse files
authored
Merge pull request #171 from semiotic-ai/ci-cache-improvements
ci: improve rust cache
2 parents 63c142b + a8f84be commit 191e68c

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

.github/workflows/tests.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ jobs:
2929
- uses: actions/cache@v3
3030
with:
3131
path: |
32-
~/.cargo/registry
33-
~/.cargo/git
34-
target
32+
~/.cargo/bin/
33+
~/.cargo/registry/index/
34+
~/.cargo/registry/cache/
35+
~/.cargo/git/db/
36+
target/
3537
key: ${{ runner.os }}-cargo-clippy
3638
- run: |
3739
rustup component add clippy
@@ -51,12 +53,14 @@ jobs:
5153
- uses: actions/cache@v3
5254
with:
5355
path: |
54-
~/.cargo/registry
55-
~/.cargo/git
56-
target
56+
~/.cargo/bin/
57+
~/.cargo/registry/index/
58+
~/.cargo/registry/cache/
59+
~/.cargo/git/db/
60+
target/
5761
key: ${{ runner.os }}-cargo-cov
58-
- run: rustup component add llvm-tools-preview
59-
- run: cargo install cargo-llvm-cov
62+
- name: Install cargo-llvm-cov
63+
uses: taiki-e/install-action@cargo-llvm-cov
6064
- name: Run tests and generate coverage report
6165
run: cargo llvm-cov test --all-features --workspace --lcov --output-path lcov.info
6266
- name: Test documentation code snippets
@@ -80,9 +84,11 @@ jobs:
8084
- uses: actions/cache@v3
8185
with:
8286
path: |
83-
~/.cargo/registry
84-
~/.cargo/git
85-
target
87+
~/.cargo/bin/
88+
~/.cargo/registry/index/
89+
~/.cargo/registry/cache/
90+
~/.cargo/git/db/
91+
target/
8692
key: ${{ runner.os }}-cargo-audit
8793
- name: Install Cargo Audit
8894
run: |
@@ -121,9 +127,11 @@ jobs:
121127
- uses: actions/cache@v3
122128
with:
123129
path: |
124-
~/.cargo/registry
125-
~/.cargo/git
126-
target
130+
~/.cargo/bin/
131+
~/.cargo/registry/index/
132+
~/.cargo/registry/cache/
133+
~/.cargo/git/db/
134+
target/
127135
key: ${{ runner.os }}-cargo-sbom
128136
- run: |
129137
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b .

0 commit comments

Comments
 (0)