Skip to content

Commit 223d1df

Browse files
blagininclaude
andauthored
ci: always run all lints (#7584)
<img width="635" height="142" alt="Zen Browser 2026-04-21 13 20 20" src="https://github.com/user-attachments/assets/872e521d-aa11-444c-9af6-d8379f64a5f1" /> always run all checks and display their results right in the CI box Signed-off-by: blaginin <github@blaginin.me> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3e00b5a commit 223d1df

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,51 @@ jobs:
214214
- name: Install nightly for fmt
215215
run: rustup toolchain install $NIGHTLY_TOOLCHAIN --component rustfmt
216216
- name: Rust Lint - Format
217+
id: fmt
218+
continue-on-error: true
217219
run: cargo +$NIGHTLY_TOOLCHAIN fmt --all --check
218220
- name: Rustc check
221+
id: check
222+
continue-on-error: true
219223
run: RUSTFLAGS="-D warnings" cargo check --profile ci --locked --all-features --all-targets
220224
- name: Rustc check (release)
225+
id: check-release
226+
continue-on-error: true
221227
run: RUSTFLAGS="-D warnings" cargo check --locked --all-features --all-targets --release
222228
- name: Rust Lint - Clippy All Features
229+
id: clippy-all
230+
continue-on-error: true
223231
run: cargo clippy --profile ci --locked --all-features --all-targets -- -D warnings
224232
- name: Rust Lint - Clippy Default Features
233+
id: clippy-default
234+
continue-on-error: true
225235
run: cargo clippy --profile ci --locked --all-targets -- -D warnings
236+
- name: Check lint results
237+
if: always()
238+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
239+
with:
240+
script: |
241+
const failed = Object.entries({
242+
fmt: '${{ steps.fmt.outcome }}',
243+
check: '${{ steps.check.outcome }}',
244+
'check-release': '${{ steps.check-release.outcome }}',
245+
'clippy-all': '${{ steps.clippy-all.outcome }}',
246+
'clippy-default': '${{ steps.clippy-default.outcome }}',
247+
}).filter(([, o]) => o === 'failure').map(([n]) => n);
248+
if (!failed.length) return;
249+
250+
const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({
251+
...context.repo, run_id: context.runId,
252+
});
253+
const url = jobs.find(j => j.name === context.job)?.check_run_url;
254+
if (url) {
255+
await github.rest.checks.update({
256+
...context.repo,
257+
check_run_id: Number(url.split('/').pop()),
258+
output: { title: `${failed.join(', ')} — failing`, summary: '' },
259+
});
260+
}
261+
core.setFailed(`Lint failed: ${failed.join(', ')}`);
226262
227263
cpp-lint:
228264
name: "C/C++ (lint)"

0 commit comments

Comments
 (0)