Skip to content

Commit 17c5ffa

Browse files
committed
add PR ci
1 parent 9cf6fd7 commit 17c5ffa

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
check:
15+
name: Check & Test
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Install Rust
22+
uses: dtolnay/rust-toolchain@stable
23+
with:
24+
components: clippy
25+
26+
- name: Cache cargo
27+
uses: Swatinem/rust-cache@v2
28+
29+
- name: Check formatting
30+
run: cargo fmt --check
31+
32+
- name: Clippy
33+
run: cargo clippy -- -D warnings
34+
35+
- name: Run tests
36+
run: cargo test --all-features
37+
38+
- name: Build
39+
run: cargo build --release

0 commit comments

Comments
 (0)