Skip to content

Changes to notebooks/01_end_to_end_example.ipynb #20

Changes to notebooks/01_end_to_end_example.ipynb

Changes to notebooks/01_end_to_end_example.ipynb #20

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
# ── Linting ─────────────────────────────────────────────────────────────────
lint:
name: Lint (ruff + black)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install linting tools
run: pip install ruff black
- name: ruff check
run: ruff check scope/ tests/
- name: black --check
run: black --check scope/ tests/
# ── Tests ────────────────────────────────────────────────────────────────────
test:
name: Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package and test dependencies
run: |
pip install --upgrade pip
pip install -e ".[dev]"
- name: Run tests with coverage
run: pytest tests/ -v --cov=scope --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
fail_ci_if_error: false
# ── Build check ──────────────────────────────────────────────────────────────
build:
name: Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install build tools
run: pip install build twine
- name: Build sdist and wheel
run: python -m build
- name: Check distribution
run: twine check dist/*