Skip to content

Commit 77ba373

Browse files
authored
ci: random improvements (#238)
* ci: save Rust cache only on build jobs * ci: use action for clippy to show in GitHub UI * ci: remove pointless filters
1 parent 7fc39ca commit 77ba373

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

.github/workflows/rust.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ name: Rust CI
22

33
on:
44
push:
5-
paths-ignore:
6-
- "**/*.md"
75
pull_request:
8-
paths-ignore:
9-
- "**/*.md"
106
schedule:
117
- cron: "0 0 * * *"
128

@@ -79,9 +75,16 @@ jobs:
7975

8076
- name: Cache Cargo registry
8177
uses: Swatinem/rust-cache@v2
78+
with:
79+
save-if: false
8280

8381
- name: Run clippy
84-
run: cargo clippy --no-deps -- -D warnings
82+
uses: giraffate/clippy-action@v1
83+
with:
84+
reporter: github-pr-check
85+
github_token: ${{ secrets.GITHUB_TOKEN }}
86+
clippy_flags: '--no-deps -- -D warnings'
87+
fail_on_error: true
8588

8689
external-deps:
8790
if: github.event_name == 'push' || github.event_name == 'schedule' || github.event.pull_request.head.repo.full_name != github.repository
@@ -100,6 +103,8 @@ jobs:
100103

101104
- name: Cache Cargo registry
102105
uses: Swatinem/rust-cache@v2
106+
with:
107+
save-if: false
103108

104109
- name: Install cargo-nextest
105110
uses: taiki-e/install-action@v2
@@ -145,6 +150,8 @@ jobs:
145150
146151
- name: Cache Cargo registry
147152
uses: Swatinem/rust-cache@v2
153+
with:
154+
save-if: false
148155

149156
- name: Run the external dependencies
150157
run: docker compose up -d
@@ -181,6 +188,8 @@ jobs:
181188

182189
- name: Cache Cargo registry
183190
uses: Swatinem/rust-cache@v2
191+
with:
192+
save-if: false
184193

185194
- name: Run fmt
186195
run: cargo fmt --all -- --check
@@ -202,6 +211,8 @@ jobs:
202211

203212
- name: Cache Cargo registry
204213
uses: Swatinem/rust-cache@v2
214+
with:
215+
save-if: false
205216

206217
- name: Run cargo-machete
207218
uses: bnjbvr/cargo-machete@v0.8.0
@@ -226,6 +237,8 @@ jobs:
226237

227238
- name: Cache Cargo registry
228239
uses: Swatinem/rust-cache@v2
240+
with:
241+
save-if: false
229242

230243
- name: Run cargo check with minimal versions
231244
run: |
@@ -256,6 +269,8 @@ jobs:
256269

257270
- name: Cache Cargo registry
258271
uses: Swatinem/rust-cache@v2
272+
with:
273+
save-if: false
259274

260275
- name: Run cargo check with every combination of features
261276
run: cargo hack check --feature-powerset --exclude-features db --no-dev-deps
@@ -283,6 +298,8 @@ jobs:
283298

284299
- name: Cache Cargo registry
285300
uses: Swatinem/rust-cache@v2
301+
with:
302+
save-if: false
286303

287304
- name: Miri setup
288305
run: cargo miri setup

0 commit comments

Comments
 (0)