@@ -19,16 +19,10 @@ jobs:
1919 with :
2020 ref : ${{ github.event.pull_request.head.ref }}
2121 repository : ${{github.event.pull_request.head.repo.full_name}}
22- - uses : actions/cache@v4
23- with :
24- path : |
25- ~/.cargo/registry
26- ~/.cargo/git
27- target
28- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2922 - uses : dtolnay/rust-toolchain@stable
3023 with :
3124 components : rustfmt, clippy
25+ - uses : Swatinem/rust-cache@v2
3226 - name : format check
3327 run : cargo fmt --all -- --check
3428 - name : clippy check
5650 with :
5751 ref : ${{ github.event.pull_request.head.ref }}
5852 repository : ${{github.event.pull_request.head.repo.full_name}}
59- - uses : actions/cache@v4
60- with :
61- path : |
62- ~/.cargo/registry
63- ~/.cargo/git
64- target
65- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
6653 - uses : dtolnay/rust-toolchain@stable
54+ - uses : Swatinem/rust-cache@v2
6755 - name : Setup gcloud
6856 uses : google-github-actions/setup-gcloud@v0.6.0
6957 with :
8876 with :
8977 ref : ${{ github.event.pull_request.head.ref }}
9078 repository : ${{github.event.pull_request.head.repo.full_name}}
91- - uses : actions/cache@v4
92- with :
93- path : |
94- ~/.cargo/registry
95- ~/.cargo/git
96- target
97- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
9879 - uses : dtolnay/rust-toolchain@stable
80+ - uses : Swatinem/rust-cache@v2
9981 - name : test
10082 env :
10183 PUBSUB_EMULATOR_HOST : localhost:8681
@@ -124,13 +106,7 @@ jobs:
124106 with :
125107 ref : ${{ github.event.pull_request.head.ref }}
126108 repository : ${{github.event.pull_request.head.repo.full_name}}
127- - uses : actions/cache@v4
128- with :
129- path : |
130- ~/.cargo/registry
131- ~/.cargo/git
132- target
133- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
109+ - uses : Swatinem/rust-cache@v2
134110 - name : setup spanner
135111 run : |
136112 gcloud config configurations create emulator
@@ -177,14 +153,8 @@ jobs:
177153 with :
178154 service_account_key : ${{ secrets.STORAGE_CREDENTIALS }}
179155 export_default_credentials : true
180- - uses : actions/cache@v4
181- with :
182- path : |
183- ~/.cargo/registry
184- ~/.cargo/git
185- target
186- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
187156 - uses : dtolnay/rust-toolchain@stable
157+ - uses : Swatinem/rust-cache@v2
188158 - name : test
189159 env :
190160 RUSTFLAGS : " -A dead_code -A unused"
@@ -203,14 +173,8 @@ jobs:
203173 with :
204174 service_account_key : ${{ secrets.STORAGE_CREDENTIALS }}
205175 export_default_credentials : true
206- - uses : actions/cache@v4
207- with :
208- path : |
209- ~/.cargo/registry
210- ~/.cargo/git
211- target
212- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
213176 - uses : dtolnay/rust-toolchain@stable
177+ - uses : Swatinem/rust-cache@v2
214178 - name : test
215179 env :
216180 RUSTFLAGS : " -A dead_code -A unused"
@@ -229,14 +193,8 @@ jobs:
229193 with :
230194 service_account_key : ${{ secrets.STORAGE_CREDENTIALS }}
231195 export_default_credentials : true
232- - uses : actions/cache@v4
233- with :
234- path : |
235- ~/.cargo/registry
236- ~/.cargo/git
237- target
238- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
239196 - uses : dtolnay/rust-toolchain@stable
197+ - uses : Swatinem/rust-cache@v2
240198 - name : test
241199 env :
242200 RUSTFLAGS : " -A dead_code -A unused"
@@ -255,14 +213,8 @@ jobs:
255213 with :
256214 service_account_key : ${{ secrets.STORAGE_CREDENTIALS }}
257215 export_default_credentials : true
258- - uses : actions/cache@v4
259- with :
260- path : |
261- ~/.cargo/registry
262- ~/.cargo/git
263- target
264- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
265216 - uses : dtolnay/rust-toolchain@stable
217+ - uses : Swatinem/rust-cache@v2
266218 - name : test
267219 env :
268220 RUSTFLAGS : " -A dead_code -A unused"
0 commit comments