From 804e15d76415d4069c881dc7b4e6f3ca7a813331 Mon Sep 17 00:00:00 2001 From: WorldTeacher Date: Fri, 24 Oct 2025 21:34:56 +0100 Subject: [PATCH 1/6] Update .drone.yml remove run on push, bump image to 3.13 --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index ac81a3c..01ab1ca 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,11 +4,11 @@ type: docker name: python-ci trigger: - event: [ push, pull_request ] + event: [ pull_request ] steps: - name: setup+deps - image: python:3.12-slim + image: python:3.13-slim environment: UV_NO_SYNC_PROGRESS: "1" commands: @@ -32,7 +32,7 @@ steps: - uv pip install pytest pytest-cov mypy ruff - name: lint-typecheck - image: python:3.12-slim + image: python:3.13-slim commands: - export PATH="$HOME/.local/bin:$PATH" - . .venv/bin/activate @@ -40,7 +40,7 @@ steps: - mypy --ignore-missing-imports . - name: test - image: python:3.12-slim + image: python:3.13-slim commands: - export PATH="$HOME/.local/bin:$PATH" - . .venv/bin/activate -- 2.49.1 From 4e1233e9e9d4901bd3d7f77577833611153e4e8e Mon Sep 17 00:00:00 2001 From: WorldTeacher Date: Fri, 24 Oct 2025 21:42:59 +0100 Subject: [PATCH 2/6] Update .drone.yml --- .drone.yml | 76 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 20 deletions(-) diff --git a/.drone.yml b/.drone.yml index 01ab1ca..e73cdd3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,48 +1,84 @@ --- kind: pipeline type: docker -name: python-ci +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: setup+deps + - 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: - - python -V - 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" - # pick python version (use .python-version if present, else 3.12) - - PYVER="$( [ -f .python-version ] && cat .python-version || echo 3.12 )" + - uv --version - uv python install "$PYVER" - - uv venv .venv - - . .venv/bin/activate - # install project + dev tools - | if [ -f pyproject.toml ] && grep -q "\[tool\.uv\]" pyproject.toml; then uv sync --all-extras --dev else uv pip install -e ".[dev]" || true - if [ -f requirements.txt ]; then uv pip install -r requirements.txt; fi + [ -f requirements.txt ] && uv pip install -r requirements.txt || true fi - - uv pip install pytest pytest-cov mypy ruff - - - name: lint-typecheck - image: python:3.13-slim - commands: - - export PATH="$HOME/.local/bin:$PATH" - - . .venv/bin/activate - - ruff check . - - mypy --ignore-missing-imports . + - 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" - - . .venv/bin/activate - - pytest -q --maxfail=1 --disable-warnings --cov --cov-report=term-missing + - 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 -- 2.49.1 From e215ba489ab999f5949d013b0588c2dc14f94775 Mon Sep 17 00:00:00 2001 From: WorldTeacher Date: Fri, 24 Oct 2025 21:44:44 +0100 Subject: [PATCH 3/6] Update .drone.yml --- .drone.yml | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/.drone.yml b/.drone.yml index e73cdd3..0a65337 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,7 +6,6 @@ name: python-uv-ci trigger: event: [ pull_request ] -# Cache to speed up uv between steps (optional but nice) volumes: - name: uv-cache temp: {} @@ -19,21 +18,13 @@ steps: 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 python install 3.13 + - uv sync --all-extras --dev - uv run ruff check . - uv run mypy --ignore-missing-imports . @@ -44,20 +35,12 @@ steps: 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 python install 3.13 + - uv sync --all-extras --dev - uv run pytest -q --maxfail=1 --disable-warnings --cov --cov-report=term-missing - name: build-wheel @@ -67,18 +50,11 @@ steps: 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 python install 3.13 + - uv sync --all-extras --dev - uv build - ls -lh dist -- 2.49.1 From 03c42dcd68fa314a0351061f510102f8b9f3fb06 Mon Sep 17 00:00:00 2001 From: WorldTeacher Date: Fri, 24 Oct 2025 21:56:47 +0100 Subject: [PATCH 4/6] Update .drone.yml --- .drone.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0a65337..8b30e23 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,11 +4,13 @@ type: docker name: python-uv-ci trigger: - event: [ pull_request ] + 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 @@ -16,23 +18,30 @@ steps: 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 --version - uv python install 3.13 - uv sync --all-extras --dev - - uv run ruff check . - - uv run mypy --ignore-missing-imports . + # install CLI tools (ruff not bundled by default) + - uv tool install ruff mypy pytest 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: @@ -41,13 +50,17 @@ steps: - export PATH="$HOME/.local/bin:$PATH" - uv python install 3.13 - uv sync --all-extras --dev - - uv run pytest -q --maxfail=1 --disable-warnings --cov --cov-report=term-missing + # tools already installed in previous step; safe to re-run for idempotency + - uv tool install 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: -- 2.49.1 From 612a5c152dcdbc6decece9e1b44256d482afed98 Mon Sep 17 00:00:00 2001 From: WorldTeacher Date: Sat, 25 Oct 2025 07:58:23 +0100 Subject: [PATCH 5/6] Update .drone.yml --- .drone.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8b30e23..4d1e8c3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -29,7 +29,10 @@ steps: - uv python install 3.13 - uv sync --all-extras --dev # install CLI tools (ruff not bundled by default) - - uv tool install ruff mypy pytest pytest-cov + - uv tool install ruff + - uv tool install mypy + - uv tool install pytest + - uv tool install pytest-cov - ruff --version - mypy --version - ruff check . @@ -51,7 +54,7 @@ steps: - uv python install 3.13 - uv sync --all-extras --dev # tools already installed in previous step; safe to re-run for idempotency - - uv tool install pytest pytest-cov + - uv add pytest pytest-cov - pytest -q --maxfail=1 --disable-warnings --cov --cov-report=term-missing - name: build-wheel -- 2.49.1 From 66dcf9bcd2e5750f1dff9c088473ccb8ec857daf Mon Sep 17 00:00:00 2001 From: WorldTeacher Date: Sat, 25 Oct 2025 08:14:52 +0100 Subject: [PATCH 6/6] Update .drone.yml --- .drone.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4d1e8c3..f240775 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,8 +31,6 @@ steps: # 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 . -- 2.49.1