From 005871441a8b796a514765a57d746343e44bd2b0 Mon Sep 17 00:00:00 2001 From: pptx704 Date: Wed, 20 May 2026 05:25:19 +0600 Subject: [PATCH] ci: split Woodpecker pipelines by scope - unit.yml: unit tests on every push and pull_request, all branches. - code-runner.yml: PR to dev/main, gated on src/wrenn/code_runner/** or tests/test_code_runner_*.py; runs `make test-code-runner`. - integration.yml: PR to dev/main, gated on src/** excluding src/wrenn/code_runner/**; runs `make test-integration`. E2E pipelines require a src/** change, so docs/test-only PRs only trigger the unit pipeline. Co-Authored-By: Claude Opus 4.7 (1M context) --- .woodpecker/code-runner.yml | 18 ++++++++++++++++++ .woodpecker/integration.yml | 21 +++++++++++++++++++++ .woodpecker/unit.yml | 11 +++++++++++ 3 files changed, 50 insertions(+) create mode 100644 .woodpecker/code-runner.yml create mode 100644 .woodpecker/integration.yml create mode 100644 .woodpecker/unit.yml diff --git a/.woodpecker/code-runner.yml b/.woodpecker/code-runner.yml new file mode 100644 index 0000000..96bff9d --- /dev/null +++ b/.woodpecker/code-runner.yml @@ -0,0 +1,18 @@ +# E2E — code_runner. PR to dev/main when code_runner sources/tests change. +when: + - event: pull_request + branch: [main, dev] + path: + include: + - "src/wrenn/code_runner/**" + - "tests/test_code_runner_*.py" + +steps: + test-code-runner: + image: ghcr.io/astral-sh/uv:python3.13-bookworm + environment: + WRENN_API_KEY: + from_secret: WRENN_API_KEY + commands: + - uv sync --dev + - make test-code-runner diff --git a/.woodpecker/integration.yml b/.woodpecker/integration.yml new file mode 100644 index 0000000..6195b13 --- /dev/null +++ b/.woodpecker/integration.yml @@ -0,0 +1,21 @@ +# E2E — integration. PR to dev/main when non-code_runner src changes. +# Path filter: include src/** but exclude src/wrenn/code_runner/** so the +# dedicated code-runner pipeline owns that surface. +when: + - event: pull_request + branch: [main, dev] + path: + include: + - "src/**" + exclude: + - "src/wrenn/code_runner/**" + +steps: + test-integration: + image: ghcr.io/astral-sh/uv:python3.13-bookworm + environment: + WRENN_API_KEY: + from_secret: WRENN_API_KEY + commands: + - uv sync --dev + - make test-integration diff --git a/.woodpecker/unit.yml b/.woodpecker/unit.yml new file mode 100644 index 0000000..4def478 --- /dev/null +++ b/.woodpecker/unit.yml @@ -0,0 +1,11 @@ +# Unit tests — every push and pull_request, all branches. +when: + - event: push + - event: pull_request + +steps: + unit-tests: + image: ghcr.io/astral-sh/uv:python3.13-bookworm + commands: + - uv sync --dev + - uv run pytest -m "not integration" -v