Skip to content

Commit b0cf5c1

Browse files
committed
ci: checks for rust
1 parent 4d4a95e commit b0cf5c1

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Check Format and Code Quality
2+
on:
3+
workflow_dispatch:
4+
workflow_call:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
- dev
10+
paths:
11+
- "src/**/**.rs"
12+
13+
jobs:
14+
check-fmt:
15+
runs-on: ubuntu-22.04
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- uses: dtolnay/rust-toolchain@stable
20+
- name: checks
21+
run: |
22+
cargo fmt --all --check
23+
24+
check-clippy:
25+
needs: [check-fmt]
26+
runs-on: ubuntu-22.04
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- uses: dtolnay/rust-toolchain@stable
31+
- uses: Swatinem/rust-cache@v2
32+
- name: cargo check
33+
run: |
34+
cargo clippy -- -D warnings

0 commit comments

Comments
 (0)