-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (27 loc) · 770 Bytes
/
ci.yml
File metadata and controls
32 lines (27 loc) · 770 Bytes
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
name: Lint
on: pull_request
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}-1
- name: Check format
run: cargo fmt -- --check
- name: Run clippy
run: cargo clippy -- -Dwarnings
aggregate:
name: lint:required
runs-on: ubuntu-latest
needs: lint
if: ${{ always() }}
steps:
- if: ${{ needs.lint.result != 'success' }}
run: exit 1