Skip to content

ci: bump actions/upload-artifact from 4 to 7 #29

ci: bump actions/upload-artifact from 4 to 7

ci: bump actions/upload-artifact from 4 to 7 #29

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# ── Lint & typecheck (single Python version, fast) ──────────────────────
quality:
name: Lint & Typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
# setup-uv respects .python-version — no actions/setup-python needed
- name: Install dependencies
run: uv sync --locked --only-group lint --only-group typecheck
- name: Ruff check
run: uv run ruff check src/ tests/ benchmarks/ examples/
- name: Ruff format
run: uv run ruff format --check src/ tests/
- name: Mypy
run: uv run mypy --strict src/ptk/
# ── Tests across Python versions ─────────────────────────────────────────
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
# Overrides .python-version for matrix builds
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --locked --only-group test
- name: Run tests
run: uv run pytest tests/ -v --tb=short
- name: Smoke test
run: |
uv run python -c "
import ptk
print(ptk.__version__)
print(ptk.minimize({'key': 'value'}))
"
- name: Prune uv cache
run: uv cache prune --ci
# ── Pre-commit hooks (backstop for contributors who skip local install) ──
pre-commit:
name: Pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install pre-commit
run: uv sync --locked --only-group hooks
- uses: pre-commit/action@v3.0.1