-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (37 loc) · 871 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
44
name: Code Style
on:
push:
branches: [main]
paths:
- ".github/workflows/lint.yml"
- "**.rs"
- "Cargo.toml"
- "Cargo.lock"
pull_request:
branches: [main]
paths:
- ".github/workflows/lint.yml"
- "**.rs"
- "Cargo.toml"
- "Cargo.lock"
jobs:
test:
name: Tests on ${{ matrix.os }} for ${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: cargo build
run: cargo build
- name: cargo fmt
run: cargo fmt
- name: cargo clippy
run: cargo clippy --tests -- -D warnings