Skip to content

Commit 4649bca

Browse files
committed
ADD github action workflow
1 parent 638ced8 commit 4649bca

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
pull_request:
7+
branches: [master, main]
8+
9+
jobs:
10+
lint:
11+
name: Lint with Ruff
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.12"
20+
21+
- name: Install ruff
22+
run: pip install ruff
23+
24+
- name: Run ruff check
25+
run: ruff check .
26+
27+
- name: Run ruff format check
28+
run: ruff format --check .
29+
30+
test:
31+
name: Test with Python ${{ matrix.python-version }}
32+
runs-on: ubuntu-latest
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
python-version: ["3.9", "3.10", "3.11", "3.12"]
37+
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- name: Set up Python ${{ matrix.python-version }}
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: ${{ matrix.python-version }}
45+
46+
- name: Install dependencies
47+
run: |
48+
python -m pip install --upgrade pip
49+
pip install -r requirements.txt
50+
pip install pytest pytest-cov
51+
52+
- name: Install package
53+
run: pip install -e .
54+
55+
- name: Run tests
56+
run: pytest tests/ -v --tb=short

0 commit comments

Comments
 (0)