From a5b275fa1255417675fdaaeed87417623ae512d4 Mon Sep 17 00:00:00 2001 From: Piotr Dec Date: Sun, 12 Jul 2026 22:47:44 +0200 Subject: [PATCH] ci: python pipeline --- .woodpecker/dev.yaml | 2 ++ .woodpecker/latest.yaml | 2 ++ .woodpecker/python.yaml | 16 ++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 .woodpecker/python.yaml diff --git a/.woodpecker/dev.yaml b/.woodpecker/dev.yaml index f837559..dbe313d 100644 --- a/.woodpecker/dev.yaml +++ b/.woodpecker/dev.yaml @@ -13,3 +13,5 @@ steps: - event: pull_request evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "ci-ready"' - event: manual + depends_on: + - name: python diff --git a/.woodpecker/latest.yaml b/.woodpecker/latest.yaml index 8309154..1ce29a7 100644 --- a/.woodpecker/latest.yaml +++ b/.woodpecker/latest.yaml @@ -12,3 +12,5 @@ steps: when: - event: [ tag, push, manual ] branch: master + depends_on: + - name: python diff --git a/.woodpecker/python.yaml b/.woodpecker/python.yaml new file mode 100644 index 0000000..fa5c5a3 --- /dev/null +++ b/.woodpecker/python.yaml @@ -0,0 +1,16 @@ +steps: + - name: test + image: ghcr.io/astral-sh/uv:0.9-python3.12-alpine + commands: + - uv sync + - pytest + - | + python src/karl/__init__.py 2>&1 | while IFS= read -r line; do + echo "$line" + if echo "$line" | grep -q "Uvicorn running on"; then + pkill -f "uvicorn" + break + fi + done + when: + - event: push