Skip to content

Commit afb140f

Browse files
committed
ci: update CI workflow to use Python 3.11 and 3.12, enhance linting and testing steps
1 parent 67f5c2e commit afb140f

File tree

1 file changed

+28
-40
lines changed

1 file changed

+28
-40
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: 🧪 CI
22

33
on:
44
push:
@@ -7,56 +7,44 @@ on:
77
branches: [ main, master ]
88

99
jobs:
10-
test:
10+
build:
1111
runs-on: ubuntu-latest
12+
1213
strategy:
1314
matrix:
14-
python-version: [3.8, 3.10, 3.13]
15+
python-version: [ "3.11", "3.12" ]
16+
1517
steps:
16-
- uses: actions/checkout@v4
18+
- name: 🧰 Checkout repository
19+
uses: actions/checkout@v4
1720

18-
- name: Set up Python
19-
uses: actions/setup-python@v4
21+
- name: 🐍 Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
2023
with:
2124
python-version: ${{ matrix.python-version }}
25+
cache: "pip"
2226

23-
- name: Install dependencies
27+
- name: 📦 Install dependencies
2428
run: |
2529
python -m pip install --upgrade pip
26-
pip install -r requirements-dev.txt
30+
pip install -e .
31+
pip install pytest ruff black
2732
28-
- name: Run tests
33+
# -----------------------------
34+
# Code quality
35+
# -----------------------------
36+
- name: 🧹 Run Ruff linter (auto-fix mode)
2937
run: |
30-
pytest -q
38+
ruff check . --fix
39+
continue-on-error: false # set true if you want lint warnings but no CI failure
3140

32-
lint:
33-
runs-on: ubuntu-latest
34-
steps:
35-
- uses: actions/checkout@v4
36-
- name: Setup Python
37-
uses: actions/setup-python@v4
38-
with:
39-
python-version: 3.13
40-
- name: Install lint
41-
run: pip install ruff
42-
- name: Ruff
43-
run: ruff check .
44-
45-
package:
46-
if: startsWith(github.ref, 'refs/tags/')
47-
runs-on: ubuntu-latest
48-
steps:
49-
- uses: actions/checkout@v4
50-
- name: Set up Python
51-
uses: actions/setup-python@v4
52-
with:
53-
python-version: 3.13
54-
- name: Build wheel
41+
- name: 🎨 Check formatting (Black)
5542
run: |
56-
python -m pip install --upgrade build
57-
python -m build
58-
- name: Upload artifact
59-
uses: actions/upload-artifact@v4
60-
with:
61-
name: dist
62-
path: dist/*
43+
black --check src examples tests
44+
45+
# -----------------------------
46+
# Tests
47+
# -----------------------------
48+
- name: 🧪 Run pytest
49+
run: |
50+
pytest -v --maxfail=1 --disable-warnings

0 commit comments

Comments
 (0)