Skip to content

Commit f445648

Browse files
committed
ci: Add GitHub Actions CI
1 parent 76bfb1a commit f445648

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
fmt:
10+
name: Format
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install Rust
17+
uses: dtolnay/rust-toolchain@nightly
18+
with:
19+
components: rustfmt
20+
21+
- name: Format
22+
run: cargo +nightly fmt --check
23+
24+
test:
25+
name: Test
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Install Rust
32+
uses: dtolnay/rust-toolchain@stable
33+
with:
34+
components: clippy
35+
36+
- name: Install system dependencies
37+
run: sudo apt-get update && sudo apt-get install -y pkg-config libssl-dev
38+
39+
- name: Cache Cargo
40+
uses: Swatinem/rust-cache@v2
41+
42+
- name: Test
43+
run: cargo test
44+
45+
- name: Clippy
46+
run: cargo clippy --all-targets --no-deps -- -D warnings

0 commit comments

Comments
 (0)