Skip to content

Commit 3204d79

Browse files
thomas-manginclaude
andcommitted
ci: Add Woodpecker CI configuration for Codeberg
Add CI pipelines mirroring GitHub Actions: - linting.yaml: ruff check (Python 3.12) - type-checking.yaml: mypy + type-ignore check (Python 3.12) - unit-testing.yaml: pytest with coverage (Python 3.12-3.14) - functional-testing.yaml: parsing/encoding/decoding (Python 3.12-3.14) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 013f061 commit 3204d79

File tree

4 files changed

+99
-0
lines changed

4 files changed

+99
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
when:
2+
- event: push
3+
branch: [main, 5.0, 4.2, 3.4]
4+
- event: pull_request
5+
branch: main
6+
7+
matrix:
8+
PYTHON_VERSION:
9+
- "3.12"
10+
- "3.13"
11+
- "3.14"
12+
13+
steps:
14+
- name: parsing
15+
image: python:${PYTHON_VERSION}-bookworm
16+
commands:
17+
- curl -LsSf https://astral.sh/uv/install.sh | sh
18+
- export PATH="$HOME/.local/bin:$PATH"
19+
- uv sync --frozen
20+
- python --version
21+
- uv run ./qa/bin/functional parsing
22+
23+
- name: encoding
24+
image: python:${PYTHON_VERSION}-bookworm
25+
commands:
26+
- curl -LsSf https://astral.sh/uv/install.sh | sh
27+
- export PATH="$HOME/.local/bin:$PATH"
28+
- uv sync --frozen
29+
- uv run ./qa/bin/functional encoding
30+
31+
- name: decoding
32+
image: python:${PYTHON_VERSION}-bookworm
33+
commands:
34+
- curl -LsSf https://astral.sh/uv/install.sh | sh
35+
- export PATH="$HOME/.local/bin:$PATH"
36+
- uv sync --frozen
37+
- uv run ./qa/bin/functional decoding

.woodpecker/linting.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
when:
2+
- event: push
3+
branch: [main, 5.0, 4.2, 3.4]
4+
- event: pull_request
5+
branch: main
6+
7+
steps:
8+
- name: lint
9+
image: python:3.12-bookworm
10+
commands:
11+
- curl -LsSf https://astral.sh/uv/install.sh | sh
12+
- export PATH="$HOME/.local/bin:$PATH"
13+
- uv sync --frozen
14+
- python --version
15+
- uv run ruff --version
16+
- uv run ruff check src qa tests --output-format=full --statistics

.woodpecker/type-checking.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
when:
2+
- event: push
3+
branch: [main, 5.0, 4.2, 3.4]
4+
- event: pull_request
5+
branch: main
6+
7+
steps:
8+
- name: type-ignore-check
9+
image: python:3.12-bookworm
10+
commands:
11+
- curl -LsSf https://astral.sh/uv/install.sh | sh
12+
- export PATH="$HOME/.local/bin:$PATH"
13+
- uv sync --frozen
14+
- echo "Checking type:ignore count against baseline..."
15+
- uv run ./qa/bin/check_type_ignores
16+
17+
- name: mypy
18+
image: python:3.12-bookworm
19+
commands:
20+
- curl -LsSf https://astral.sh/uv/install.sh | sh
21+
- export PATH="$HOME/.local/bin:$PATH"
22+
- uv sync --frozen
23+
- echo "Running mypy on full codebase (must pass with 0 errors)..."
24+
- uv run mypy --version
25+
- uv run mypy src/exabgp/

.woodpecker/unit-testing.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
when:
2+
- event: push
3+
branch: [main, 5.0, 4.2, 3.4]
4+
- event: pull_request
5+
branch: main
6+
7+
matrix:
8+
PYTHON_VERSION:
9+
- "3.12"
10+
- "3.13"
11+
- "3.14"
12+
13+
steps:
14+
- name: pytest
15+
image: python:${PYTHON_VERSION}-bookworm
16+
commands:
17+
- curl -LsSf https://astral.sh/uv/install.sh | sh
18+
- export PATH="$HOME/.local/bin:$PATH"
19+
- uv sync --frozen
20+
- python --version
21+
- env PYTHONPATH=src exabgp_log_enable=false uv run pytest --cov --cov-reset ./tests/unit/test_*.py ./tests/fuzz/test_*.py

0 commit comments

Comments
 (0)