-
Notifications
You must be signed in to change notification settings - Fork 38
48 lines (44 loc) · 1.16 KB
/
commits.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
44
45
46
47
48
name: Lints
on:
workflow_dispatch:
push:
branches: [ "main" ]
paths-ignore:
- '*.md'
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cargo Format
run: cargo fmt --check
clippy:
name: Clippy
needs: fmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Rust Cache (custom)
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/registry/src/**/librocksdb-sys-*
~/.cargo/git/db/
target/
key: custom-rust-clippy-${{ hashFiles('**/Cargo.lock') }}
restore-keys: custom-rust-clippy-
- name: Cargo Clippy
run: cargo clippy --all-features --all-targets --timings -- -Dclippy::all -Dwarnings
- name: Upload Timings
uses: actions/upload-artifact@v3
with:
path: target/cargo-timings/cargo-timing.html