Skip to content

Commit 22e9c14

Browse files
committed
Add CI workflow for lint and tests
1 parent a5e058a commit 22e9c14

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, master]
6+
pull_request:
7+
8+
jobs:
9+
lint:
10+
name: Lint
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: astral-sh/setup-uv@v7
16+
with:
17+
enable-cache: true
18+
19+
- name: Install dependencies
20+
run: uv sync --locked --dev
21+
22+
- name: Ruff check
23+
run: uv run ruff check --output-format github .
24+
25+
- name: Ruff format check
26+
run: uv run ruff format --check .
27+
28+
test:
29+
name: Test (Python ${{ matrix.python-version }})
30+
runs-on: ubuntu-latest
31+
strategy:
32+
matrix:
33+
python-version: ["3.12", "3.13"]
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- uses: astral-sh/setup-uv@v7
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
enable-cache: true
41+
42+
- name: Install dependencies
43+
run: uv sync --locked --dev
44+
45+
- name: Run tests
46+
run: uv run pytest

0 commit comments

Comments
 (0)