Skip to content

Commit 5bb877f

Browse files
michaelchuclaude
andcommitted
Add GitHub Actions CI pipeline
Runs fmt, clippy, test, and build checks on push/PR to main, including postgres feature flag coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e6fd321 commit 5bb877f

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUSTFLAGS: "-Dwarnings"
12+
13+
jobs:
14+
fmt:
15+
name: Format
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: dtolnay/rust-toolchain@stable
20+
with:
21+
components: rustfmt
22+
- run: cargo fmt --check
23+
24+
clippy:
25+
name: Clippy
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: dtolnay/rust-toolchain@stable
30+
with:
31+
components: clippy
32+
- uses: Swatinem/rust-cache@v2
33+
- run: cargo clippy --all-targets
34+
- run: cargo clippy --all-targets --features postgres
35+
36+
test:
37+
name: Test
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: dtolnay/rust-toolchain@stable
42+
- uses: Swatinem/rust-cache@v2
43+
- run: cargo test
44+
45+
build:
46+
name: Build
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v4
50+
- uses: dtolnay/rust-toolchain@stable
51+
- uses: Swatinem/rust-cache@v2
52+
- run: cargo build
53+
- run: cargo build --features postgres

0 commit comments

Comments
 (0)