-
Notifications
You must be signed in to change notification settings - Fork 9
55 lines (47 loc) · 1.13 KB
/
style-sanity.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
49
50
51
52
53
54
55
name: Rust linting, formatting and audit
on:
pull_request:
paths:
- .github/workflows/*.yml
- '**/*.rs'
- Cargo.toml
- Cargo.lock
workflow_dispatch:
jobs:
clippy-linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
components: clippy
override: true
- name: Clippy check
run: |
export RUSTFLAGS="--deny warnings"
time cargo clippy --verbose
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
components: rustfmt
override: true
- name: Check formatting
run: |
rustfmt --version
cargo fmt -- --check
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install cargo-audit
uses: actions-rs/install@v0.1.2
with:
crate: cargo-audit
version: latest
- name: Audit
run: cargo audit