|
name: CI |
|
|
|
on: |
|
push: |
|
branches: [ '**' ] |
|
pull_request: |
|
branches: [ '**' ] |
|
|
|
jobs: |
|
build: |
|
runs-on: ubuntu-latest |
|
strategy: |
|
matrix: |
|
python-version: ['3.10', '3.11', '3.12'] |
|
|
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@v4 |
|
|
|
- name: Set up Python ${{ matrix.python-version }} |
|
uses: actions/setup-python@v5 |
|
with: |
|
python-version: ${{ matrix.python-version }} |
|
|
|
- name: Install tools |
|
run: | |
|
python -m pip install --upgrade pip |
|
pip install -e ".[ci]" |
|
|
|
- name: Lint (Ruff) |
|
run: | |
|
ruff check . |
|
|
|
- name: Format check (Black) |
|
run: | |
|
black --check src examples tests |
|
|
|
- name: Type check (MyPy) |
|
run: | |
|
mypy --install-types --non-interactive |
|
|
|
- name: Install package |
|
run: | |
|
pip install . |
|
|
|
- name: Build package |
|
run: | |
|
pip install build |
|
python -m build |
|
|
|
- name: Run tests |
|
run: | |
|
pytest -q |