Skip to content

Commit df6bde8

Browse files
committed
add github actions ci
1 parent da48632 commit df6bde8

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.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+
jobs:
9+
test:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: [ubuntu-latest, macos-latest, windows-latest]
14+
15+
runs-on: ${{ matrix.os }}
16+
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v4
20+
21+
- name: Install Rust toolchain
22+
uses: actions-rust-lang/setup-rust-toolchain@v1
23+
with:
24+
toolchain: stable
25+
components: rustfmt, clippy
26+
27+
- name: Cache Rust builds
28+
uses: Swatinem/rust-cache@v2
29+
30+
- name: Check formatting
31+
run: cargo fmt --all -- --check
32+
33+
- name: Run clippy
34+
run: cargo clippy --all-targets --all-features -- -D warnings
35+
36+
- name: Run tests
37+
run: cargo test --all-features
38+

0 commit comments

Comments
 (0)