-
Notifications
You must be signed in to change notification settings - Fork 8
43 lines (35 loc) · 926 Bytes
/
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: Lint
on:
pull_request:
runs:
using: composite
steps:
- name: Setup Rust
uses: dtolnay/[email protected]
with:
components: clippy,rustfmt
- name: Check rust version after install
run: |
rustc --version;
cargo --version;
cargo clippy --version;
cargo fmt --version;
shell: bash
- name: Setup rust lint cache
uses: actions/cache@v3
with:
path: |
~/.cargo/
target/
key: ${{ runner.os }}-cargo-lint-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Rust tools
run: cargo install cargo-sort --locked
shell: bash
- name: Cargo sort
run: cargo sort --workspace --check
shell: bash
- name: Cargo fmt
run: cargo fmt --all --check
shell: bash
- name: Clippy check
run: cargo clippy --all-features --all-targets --tests -- -D warning