From 3f5340a0911c6a27ff12a457168f3215d6d0443a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 26 Dec 2025 14:48:52 +0100 Subject: [PATCH] ci: cleanup python checks * Add a 'base'-step, python-venv, that creates the venv and installs all python packages we'll be using. * Make the codespell/mypy steps depend on python-venv, and don't install anything (it's already done by python-venv) --- .woodpecker.yaml | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 35d52d67..168a26b4 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -1,7 +1,7 @@ # -*- yaml -*- steps: - - name: codespell + - name: python-venv when: - event: [manual, pull_request] - event: [push, tag] @@ -11,9 +11,26 @@ steps: - apk add openssl - apk add python3 - apk add py3-pip - - python3 -m venv codespell-venv - - source codespell-venv/bin/activate + - python -m venv venv + - source venv/bin/activate + - python -m pip install --upgrade pip - pip install codespell + - pip install mypy + - pip install ruff + - deactivate + + - name: codespell + when: + - event: [manual, pull_request] + - event: [push, tag] + branch: [master, releases/*] + depends_on: [python-venv] + image: alpine:edge + commands: + - ls -a + - ls venv + - python --version + - source venv/bin/activate - codespell - deactivate @@ -22,15 +39,10 @@ steps: - event: [manual, pull_request] - event: [push, tag] branch: [master, releases/*] + depends_on: [python-venv] image: alpine:edge commands: - - apk add openssl - - apk add python3 - - apk add py3-pip - - python3 -m venv mypy-venv - - source mypy-venv/bin/activate - - pip install mypy - - pip install ruff + - source venv/bin/activate - mypy - ruff check - deactivate