|
17 | 17 | with:
|
18 | 18 | toolchain: stable
|
19 | 19 | override: true
|
20 |
| - - uses: actions-rs/cargo@v1 |
21 |
| - with: |
22 |
| - command: install |
23 |
| - args: cargo-sweep |
24 | 20 |
|
25 |
| - - name: Cache directories |
26 |
| - uses: actions/cache@v2 |
27 |
| - with: |
28 |
| - path: | |
29 |
| - ~/.cargo/registry |
30 |
| - ~/.cargo/bin |
31 |
| - ~/.cargo/git |
32 |
| - key: cargo-test-dirs-${{ hashFiles('**/Cargo.lock') }} |
33 |
| - restore-keys: cargo-test-dirs- |
34 |
| - - name: Cache build |
35 |
| - uses: actions/cache@v2 |
36 |
| - with: |
37 |
| - path: target |
38 |
| - key: cargo-test-build-${{ steps.install.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} |
39 |
| - restore-keys: | |
40 |
| - cargo-test-build-${{ steps.install.outputs.rustc_hash }}- |
41 |
| - cargo-test-build- |
42 |
| -
|
43 |
| - - name: Register artifacts |
44 |
| - uses: actions-rs/cargo@v1 |
45 |
| - with: |
46 |
| - command: sweep |
47 |
| - args: --stamp |
| 21 | + - name: restore build & cargo cache |
| 22 | + uses: Swatinem/rust-cache@v1 |
48 | 23 |
|
49 | 24 | - name: Launch postgres and min.io
|
50 | 25 | run: |
|
|
76 | 51 | - name: Clean up the database
|
77 | 52 | run: docker-compose down --volumes
|
78 | 53 |
|
79 |
| - - name: Clean unused artifacts |
80 |
| - uses: actions-rs/cargo@v1 |
81 |
| - with: |
82 |
| - command: sweep |
83 |
| - args: --file |
84 |
| - |
85 | 54 | fmt:
|
86 | 55 | name: Rustfmt
|
87 | 56 | runs-on: ubuntu-latest
|
@@ -112,42 +81,11 @@ jobs:
|
112 | 81 | toolchain: stable
|
113 | 82 | override: true
|
114 | 83 | components: clippy
|
115 |
| - - uses: actions-rs/cargo@v1 |
116 |
| - with: |
117 |
| - command: install |
118 |
| - args: cargo-sweep |
119 | 84 |
|
120 |
| - - name: Cache directories |
121 |
| - uses: actions/cache@v2 |
122 |
| - with: |
123 |
| - path: | |
124 |
| - ~/.cargo/registry |
125 |
| - ~/.cargo/bin |
126 |
| - ~/.cargo/git |
127 |
| - key: cargo-clippy-dirs-${{ hashFiles('**/Cargo.lock') }} |
128 |
| - restore-keys: cargo-clippy-dirs- |
129 |
| - - name: Cache build |
130 |
| - uses: actions/cache@v2 |
131 |
| - with: |
132 |
| - path: target |
133 |
| - key: cargo-clippy-${{ steps.install.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} |
134 |
| - restore-keys: | |
135 |
| - cargo-clippy-${{ steps.install.outputs.rustc_hash }}- |
136 |
| - cargo-clippy- |
137 |
| -
|
138 |
| - - name: Register artifacts |
139 |
| - uses: actions-rs/cargo@v1 |
140 |
| - with: |
141 |
| - command: sweep |
142 |
| - args: --stamp |
| 85 | + - name: restore build & cargo cache |
| 86 | + uses: Swatinem/rust-cache@v1 |
143 | 87 |
|
144 | 88 | - uses: actions-rs/cargo@v1
|
145 | 89 | with:
|
146 | 90 | command: clippy
|
147 | 91 | args: --all-targets --workspace --locked -- -D warnings
|
148 |
| - |
149 |
| - - name: Clean unused artifacts |
150 |
| - uses: actions-rs/cargo@v1 |
151 |
| - with: |
152 |
| - command: sweep |
153 |
| - args: --file |
0 commit comments