Skip to content

Commit 900cec9

Browse files
committed
ci
1 parent 0bd2ec6 commit 900cec9

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
fmt:
11+
name: Formatting
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install Rust stable
17+
uses: dtolnay/rust-toolchain@stable
18+
with:
19+
components: rustfmt
20+
21+
- name: Install taplo
22+
uses: taiki-e/install-action@taplo
23+
24+
- name: Check Rust formatting
25+
run: cargo fmt --all -- --check
26+
27+
- name: Check TOML formatting
28+
run: taplo fmt --check
29+
30+
lint:
31+
name: Lint
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Install Rust stable
37+
uses: dtolnay/rust-toolchain@stable
38+
with:
39+
components: clippy
40+
41+
- name: Cache dependencies
42+
uses: Swatinem/rust-cache@v2
43+
44+
- name: Run Clippy
45+
run: cargo clippy --all-targets --all-features -- -D warnings

0 commit comments

Comments
 (0)