forked from qdrant/qdrant
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.18 KB
/
rust-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Formatter and linter
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ '**' ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install minimal nightly (only for fmt)
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Install minimal stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: actions/checkout@v4
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2
with:
key: clippy
- name: Install dependencies
run: sudo apt-get install clang libunwind-dev
- name: Check code formatting
run: cargo +nightly fmt --all -- --check
- name: Check cargo clippy warnings
run: cargo clippy --workspace -- -D warnings
- name: Check cargo clippy warnings for all targets
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Check cargo clippy warnings for all targets and features
run: cargo clippy --workspace --all-targets --all-features -- -D warnings