77 lines
2.2 KiB
YAML
77 lines
2.2 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: python-uv-ci
|
|
|
|
trigger:
|
|
event: [ push, pull_request ]
|
|
|
|
volumes:
|
|
- name: uv-cache
|
|
temp: {}
|
|
- name: uv-home
|
|
temp: {} # persists ~/.local (uv tool shims/envs) across steps in this run
|
|
|
|
steps:
|
|
- name: lint+typecheck
|
|
image: python:3.13-slim
|
|
volumes:
|
|
- name: uv-cache
|
|
path: /root/.cache/uv
|
|
- name: uv-home
|
|
path: /root/.local
|
|
environment:
|
|
UV_NO_SYNC_PROGRESS: "1"
|
|
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 3.13
|
|
- uv sync --all-extras --dev
|
|
# install CLI tools (ruff not bundled by default)
|
|
- uv tool install ruff
|
|
- uv tool install mypy
|
|
- uv tool install pytest
|
|
- uv tool install pytest-cov
|
|
- ruff --version
|
|
- mypy --version
|
|
- ruff check .
|
|
- mypy --ignore-missing-imports .
|
|
|
|
- name: test
|
|
image: python:3.13-slim
|
|
volumes:
|
|
- name: uv-cache
|
|
path: /root/.cache/uv
|
|
- name: uv-home
|
|
path: /root/.local
|
|
environment:
|
|
UV_NO_SYNC_PROGRESS: "1"
|
|
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 3.13
|
|
- uv sync --all-extras --dev
|
|
# tools already installed in previous step; safe to re-run for idempotency
|
|
- uv add pytest pytest-cov
|
|
- 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
|
|
- name: uv-home
|
|
path: /root/.local
|
|
environment:
|
|
UV_NO_SYNC_PROGRESS: "1"
|
|
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 3.13
|
|
- uv sync --all-extras --dev
|
|
- uv build
|
|
- ls -lh dist
|