-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (32 loc) · 1.04 KB
/
clippy.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
name: Clippy check
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Make sure CI fails on all warnings, including Clippy lints
env:
RUSTFLAGS: "-Dwarnings"
jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- name: Install bevy linux dependencies
run: sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run clippy
run: cargo clippy --color always --all-targets --all-features
- name: Run fmt check
run: cargo fmt --all --check -- --color=always
- name: Run audit
run: cargo install cargo-audit --force && cargo audit
# to update the dependencies in the lock file, run `cargo update`