Skip to content

Commit 22af632

Browse files
authored
Create ci.yml
1 parent 486fffe commit 22af632

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
test:
11+
name: Test on ${{ matrix.os }} - Python ${{ matrix.python-version }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
python-version: ['3.10', '3.11', '3.12']
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install Rust
28+
uses: dtolnay/rust-toolchain@stable
29+
30+
- name: Build and install package
31+
run: |
32+
pip install maturin
33+
maturin develop
34+
35+
- name: Run tests
36+
run: python test.py
37+
38+
lint:
39+
name: Lint
40+
runs-on: ubuntu-latest
41+
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Set up Rust
46+
uses: dtolnay/rust-toolchain@stable
47+
with:
48+
components: rustfmt, clippy
49+
50+
- name: Check formatting
51+
run: cargo fmt --all -- --check
52+
53+
- name: Run clippy
54+
run: cargo clippy --all-targets --all-features -- -D warnings

0 commit comments

Comments
 (0)