fix CI python version and deploy version stamping
Some checks failed
ci/woodpecker/push/deploy Pipeline was successful
ci/woodpecker/push/ci Pipeline failed

- Use --python 3.13 so uv resolves to whichever 3.13.x is in the image
- Use CI_PIPELINE_NUMBER for package version (shallow clone breaks rev-list)
This commit is contained in:
kert
2026-02-28 15:40:44 -05:00
parent 26db81b8dd
commit 3db0aff9b0
2 changed files with 4 additions and 10 deletions

View File

@@ -8,20 +8,16 @@ when:
steps: steps:
- name: lint - name: lint
image: ghcr.io/astral-sh/uv:python3.13-bookworm-slim image: ghcr.io/astral-sh/uv:python3.13-bookworm-slim
environment:
UV_PYTHON_PREFERENCE: only-system
commands: commands:
- uv sync --dev - uv sync --dev --python 3.13
- uv pip install -e . - uv pip install -e .
- uv run ruff check src/ tests/ --output-format=concise - uv run ruff check src/ tests/ --output-format=concise
- uv run ruff format --check src/ tests/ - uv run ruff format --check src/ tests/
- name: test - name: test
image: ghcr.io/astral-sh/uv:python3.13-bookworm-slim image: ghcr.io/astral-sh/uv:python3.13-bookworm-slim
environment:
UV_PYTHON_PREFERENCE: only-system
commands: commands:
- uv sync --dev - uv sync --dev --python 3.13
- uv pip install -e . - uv pip install -e .
- uv run pytest tests/ --no-cov --tb=short -q - uv run pytest tests/ --no-cov --tb=short -q

View File

@@ -12,11 +12,9 @@ steps:
- name: build-package - name: build-package
image: ghcr.io/astral-sh/uv:python3.13-bookworm-slim image: ghcr.io/astral-sh/uv:python3.13-bookworm-slim
commands: commands:
- apt-get update -qq && apt-get install -y -qq git > /dev/null # Stamp a unique version using Woodpecker pipeline number
# Stamp a unique version: base version + .dev{commit_count}
- COMMIT_NUM=$(git rev-list --count HEAD)
- BASE=$(grep '^version' pyproject.toml | head -1 | sed 's/.*"\(.*\)"/\1/') - BASE=$(grep '^version' pyproject.toml | head -1 | sed 's/.*"\(.*\)"/\1/')
- uv version "$BASE.dev$COMMIT_NUM" --no-sync - uv version "$BASE.dev${CI_PIPELINE_NUMBER}" --no-sync
- uv build --out-dir dist/ - uv build --out-dir dist/
- ls -lh dist/ - ls -lh dist/