Skip to content

Commit 435a100

Browse files
committed
ci: clippy
1 parent 37bc09e commit 435a100

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

.cargo/config.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[alias]
2-
# Warnings create a lot of noise, we only print errors.
3-
check-clippy = "clippy --no-deps -- --allow warnings"
4-
51
# Can be safely removed once Cargo's sparse protocol (see
62
# https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html#cargos-sparse-protocol)
73
# becomes the default.

.github/workflows/ci.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,31 @@ jobs:
238238
- name: Check formatting
239239
run: just format --check
240240

241+
clippy:
242+
name: Clippy linting
243+
runs-on: ubuntu-latest
244+
timeout-minutes: 10
245+
env:
246+
RUSTFLAGS: "-D warnings"
247+
steps:
248+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
249+
- name: Setup dependencies
250+
run: |
251+
sudo apt-get update
252+
sudo apt-get install -y protobuf-compiler
253+
254+
- uses: actions-rust-lang/setup-rust-toolchain@fb51252c7ba57d633bc668f941da052e410add48 # v1
255+
256+
- name: Setup just
257+
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
258+
259+
- name: Run linting
260+
run: just lint
261+
241262
release-check:
242263
name: Build in release mode
243264
runs-on: ubuntu-latest
244-
timeout-minutes: 60
265+
timeout-minutes: 10
245266
env:
246267
RUSTFLAGS: "-D warnings"
247268
steps:

justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ default:
66
format *EXTRA_FLAGS:
77
cargo fmt --all {{EXTRA_FLAGS}}
88

9+
# Run Clippy linting (cargo clippy)
10+
lint:
11+
cargo clippy --no-deps -- --allow warnings
12+
913
# Check Rust code (cargo check)
1014
check *EXTRA_FLAGS:
1115
cargo check {{EXTRA_FLAGS}}

0 commit comments

Comments
 (0)