Skip to content

Commit f32b66b

Browse files
committed
Add basic CI workflow
1 parent 6be0571 commit f32b66b

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+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
formatting:
15+
name: Formatting
16+
runs-on: ubuntu-24.04
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: dtolnay/rust-toolchain@stable
21+
with:
22+
components: rustfmt
23+
- run: cargo fmt --check
24+
25+
clippy:
26+
name: Clippy
27+
runs-on: ubuntu-24.04
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: dtolnay/rust-toolchain@stable
32+
- uses: Swatinem/rust-cache@v2
33+
with:
34+
# only save the cache on the main branch
35+
# https://github.com/Swatinem/rust-cache/issues/95
36+
save-if: ${{ github.ref == 'refs/heads/main' }}
37+
- run: cargo clippy -- -D warnings
38+
39+
typos:
40+
name: Typos
41+
runs-on: ubuntu-24.04
42+
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: crate-ci/[email protected]

0 commit comments

Comments
 (0)