--- kind: pipeline type: docker name: python-uv-ci trigger: event: [ pull_request ] # Cache to speed up uv between steps (optional but nice) volumes: - name: uv-cache temp: {} steps: - name: lint+typecheck image: python:3.13-slim volumes: - name: uv-cache path: /root/.cache/uv environment: UV_NO_SYNC_PROGRESS: "1" PYVER: "3.13" commands: - apt-get update && apt-get install -y curl ca-certificates && rm -rf /var/lib/apt/lists/* - curl -LsSf https://astral.sh/uv/install.sh | sh - export PATH="$HOME/.local/bin:$PATH" - uv --version - uv python install "$PYVER" - | if [ -f pyproject.toml ] && grep -q "\[tool\.uv\]" pyproject.toml; then uv sync --all-extras --dev else uv pip install -e ".[dev]" || true [ -f requirements.txt ] && uv pip install -r requirements.txt || true fi - uv pip install ruff mypy pytest pytest-cov - uv run ruff check . - uv run mypy --ignore-missing-imports . - name: test image: python:3.13-slim volumes: - name: uv-cache path: /root/.cache/uv environment: UV_NO_SYNC_PROGRESS: "1" PYVER: "3.13" commands: - apt-get update && apt-get install -y curl ca-certificates && rm -rf /var/lib/apt/lists/* - curl -LsSf https://astral.sh/uv/install.sh | sh - export PATH="$HOME/.local/bin:$PATH" - uv python install "$PYVER" - | if [ -f pyproject.toml ] && grep -q "\[tool\.uv\]" pyproject.toml; then uv sync --all-extras --dev else uv pip install -e ".[dev]" || true [ -f requirements.txt ] && uv pip install -r requirements.txt || true fi - uv pip install pytest pytest-cov - uv run pytest -q --maxfail=1 --disable-warnings --cov --cov-report=term-missing - name: build-wheel image: python:3.13-slim volumes: - name: uv-cache path: /root/.cache/uv environment: UV_NO_SYNC_PROGRESS: "1" PYVER: "3.13" commands: - apt-get update && apt-get install -y curl ca-certificates && rm -rf /var/lib/apt/lists/* - curl -LsSf https://astral.sh/uv/install.sh | sh - export PATH="$HOME/.local/bin:$PATH" - uv python install "$PYVER" - | if [ -f pyproject.toml ] && grep -q "\[tool\.uv\]" pyproject.toml; then uv sync --all-extras --dev else uv pip install -e ".[dev]" || true [ -f requirements.txt ] && uv pip install -r requirements.txt || true fi - uv build - ls -lh dist