Skip to content

Commit 5f7623e

Browse files
committed
Add CI workflow for fmt, clippy, and build
1 parent 83dfa8d commit 5f7623e

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
fmt:
13+
name: Format
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions-rust-lang/setup-rust-toolchain@v1
18+
with:
19+
components: rustfmt
20+
- run: cargo fmt --check
21+
22+
clippy:
23+
name: Clippy
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions-rust-lang/setup-rust-toolchain@v1
28+
with:
29+
components: clippy
30+
- run: cargo clippy -- -D warnings
31+
32+
build:
33+
name: Build
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: actions-rust-lang/setup-rust-toolchain@v1
38+
- run: cargo build

0 commit comments

Comments
 (0)