Skip to content

docs: add comprehensive CONTRIBUTING.md #11

docs: add comprehensive CONTRIBUTING.md

docs: add comprehensive CONTRIBUTING.md #11

Workflow file for this run

name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
# prevent overlapping runs on the same ref
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-typecheck:
name: Lint & Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install full deps for lint/typecheck
run: |
python -m pip install -U pip
python -m pip install -e ".[dev,all]"
- name: Ruff (lint)
run: ruff check .
- name: Black (format check)
run: black --check .
- name: Mypy (type check)
run: mypy --config-file pyproject.toml spax
tests:
name: Tests (py${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install package (with test extras)
run: |
python -m pip install -U pip
python -m pip install -e ".[dev,all]"
- name: Pytest
run: |
pytest -q ${{ matrix.python-version == '3.14' && '--cov=spax --cov-report=xml --cov-report=term-missing' || '' }}
- name: Upload coverage.xml artifact
uses: actions/upload-artifact@v4
if: matrix.python-version == '3.14'
with:
name: coverage-py3.14
path: coverage.xml
build:
name: Build dist & twine check
runs-on: ubuntu-latest
needs: [lint-typecheck, tests]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Build
run: |
python -m pip install -U pip build twine
python -m build
twine check dist/*
- name: Upload dist artifacts
uses: actions/upload-artifact@v4
with:
name: spax-dist
path: dist/*