Files
stack/.woodpecker/ci.yml
kert 38477e0675
Some checks failed
ci/woodpecker/push/infra-ci Pipeline was successful
ci/woodpecker/push/deploy Pipeline failed
coverage 99% coverage
ci/woodpecker/push/ci Pipeline was successful
persist coverage badge SVG + deduplicate UV setup (fix #42, fix #43)
- Upload badge SVG to Gitea generic package registry for stable URL
- Set UV_PROJECT_ENVIRONMENT=.venv so test reuses lint's installed env
- Remove redundant uv sync/pip install from test and coverage-badge steps
2026-03-13 10:48:14 -04:00

57 lines
1.8 KiB
YAML

# ── Quality gate ─────────────────────────────────────────────────
# Runs on every push and PR. Must pass before merge to main.
# Gitea branch protection requires this pipeline's status checks.
when:
- event: [push, pull_request, manual]
steps:
- name: lint
image: ghcr.io/astral-sh/uv:python3.13-bookworm-slim
environment:
UV_PYTHON_PREFERENCE: only-system
UV_LINK_MODE: copy
UV_PROJECT_ENVIRONMENT: .venv
commands:
- uv python pin 3.13.11
- uv sync --dev
- uv pip install -e .
- uv run ruff check src/ tests/ --output-format=concise
- uv run ruff format --check src/ tests/
- name: test
image: ghcr.io/astral-sh/uv:python3.13-bookworm-slim
environment:
UV_PYTHON_PREFERENCE: only-system
UV_LINK_MODE: copy
UV_PROJECT_ENVIRONMENT: .venv
commands:
- uv run pytest tests/ --cov=src --cov-report=term-missing --cov-fail-under=99 -q 2>&1 | tee pytest.out
- uv run python dev/scripts/coverage_badge.py < pytest.out > coverage.svg
depends_on:
- lint
- name: coverage-badge
image: ghcr.io/astral-sh/uv:python3.13-bookworm-slim
failure: ignore
environment:
UV_PYTHON_PREFERENCE: only-system
UV_LINK_MODE: copy
UV_PROJECT_ENVIRONMENT: .venv
GITEA_TOKEN:
from_secret: gitea_token
GITEA_URL:
from_secret: gitea_url
commands:
- uv run python dev/scripts/coverage_badge.py --post pytest.out
- uv run python dev/scripts/coverage_badge.py --upload coverage.svg
depends_on:
- test
- name: validate-compose
image: docker:cli
volumes:
- /run/user/1000/docker.sock:/var/run/docker.sock
commands:
- docker compose config --quiet