Skip to content

Commit dc995f7

Browse files
Move CI to in-pipeline Woodpecker
- Add .woodpecker.yml so the new pipeline's Woodpecker stack runs validation on every push. - Disable push/PR triggers on the GitHub-hosted validation workflows; the new pipeline does deterministic host-side validation before pushing to origin. Tag-triggered release/publish/deploy workflows are unchanged. - Re-enable Public Boundary on push and pull_request as a defense-in-depth scan in addition to the in-pipeline pre-push leak guard.
1 parent 689885c commit dc995f7

3 files changed

Lines changed: 95 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
name: CI
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
4+
workflow_dispatch:
85

96
permissions:
107
contents: read

.github/workflows/public-boundary.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Public Boundary
33
on:
44
pull_request:
55
push:
6+
workflow_dispatch:
67

78
permissions:
89
contents: read

.woodpecker.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
when:
2+
- event: [push, pull_request]
3+
4+
steps:
5+
lint:
6+
image: python:3.12
7+
commands:
8+
- pip install -e '.[dev]'
9+
- ruff check src/ tests/
10+
- mypy src/durable_workflow/
11+
12+
test-python-310:
13+
image: python:3.10
14+
commands:
15+
- pip install -e '.[dev]'
16+
- pytest tests/ -m "not integration" -q
17+
18+
test-python-311:
19+
image: python:3.11
20+
commands:
21+
- pip install -e '.[dev]'
22+
- pytest tests/ -m "not integration" -q
23+
24+
test-python-312:
25+
image: python:3.12
26+
commands:
27+
- pip install -e '.[dev]'
28+
- pytest tests/ -m "not integration" -q
29+
30+
package:
31+
image: python:3.12
32+
commands:
33+
- pip install build twine
34+
- python -m build
35+
- twine check dist/*
36+
- python scripts/smoke-built-package.py
37+
38+
docs-build:
39+
image: python:3.12
40+
commands:
41+
- pip install -e '.[docs]'
42+
- mkdocs build --strict
43+
44+
cli-parity:
45+
image: python:3.12
46+
commands:
47+
- apt-get update
48+
- apt-get install -y git
49+
- |
50+
if [ -n "$${CI_NETRC_MACHINE:-}" ] && [ -n "$${CI_NETRC_USERNAME:-}" ] && [ -n "$${CI_NETRC_PASSWORD:-}" ]; then
51+
cat > "$HOME/.netrc" <<EOF
52+
machine $${CI_NETRC_MACHINE}
53+
login $${CI_NETRC_USERNAME}
54+
password $${CI_NETRC_PASSWORD}
55+
EOF
56+
chmod 600 "$HOME/.netrc"
57+
fi
58+
- export FORGE_BASE="$${CI_FORGE_URL%/}"
59+
- rm -rf /tmp/cli
60+
- git clone --depth 1 "$${FORGE_BASE}/$${CI_REPO_OWNER}/cli.git" /tmp/cli
61+
- python scripts/check-cli-parity.py --cli /tmp/cli
62+
63+
integration:
64+
image: docker:27-cli
65+
privileged: true
66+
commands:
67+
- apk add --no-cache bash git python3 py3-pip docker-cli-compose
68+
- |
69+
if [ -n "$${CI_NETRC_MACHINE:-}" ] && [ -n "$${CI_NETRC_USERNAME:-}" ] && [ -n "$${CI_NETRC_PASSWORD:-}" ]; then
70+
cat > "$HOME/.netrc" <<EOF
71+
machine $${CI_NETRC_MACHINE}
72+
login $${CI_NETRC_USERNAME}
73+
password $${CI_NETRC_PASSWORD}
74+
EOF
75+
chmod 600 "$HOME/.netrc"
76+
fi
77+
- export FORGE_BASE="$${CI_FORGE_URL%/}"
78+
- repo_parent="$(dirname "$PWD")"
79+
- rm -rf "$repo_parent/server"
80+
- git clone --depth 1 "$${FORGE_BASE}/$${CI_REPO_OWNER}/server.git" "$repo_parent/server"
81+
- export WORKFLOW_PACKAGE_SOURCE="$${FORGE_BASE}/$${CI_REPO_OWNER}/workflow.git"
82+
- export WORKFLOW_PACKAGE_REF=v2
83+
- python3 -m pip install -e '.[dev]'
84+
- trap 'docker compose -f docker-compose.test.yml down -v' EXIT
85+
- docker compose -f docker-compose.test.yml up -d --wait --timeout 120
86+
- DURABLE_WORKFLOW_SERVER_URL=http://localhost:8080 DURABLE_WORKFLOW_AUTH_TOKEN=test-token pytest tests/integration/ -v
87+
88+
public-boundary:
89+
image: python:3.12
90+
commands:
91+
- export PUBLIC_BOUNDARY_GIT_RANGE="$${CI_COMMIT_SHA}^..$${CI_COMMIT_SHA}"
92+
- if [ -n "$${CI_PREV_COMMIT_SHA:-}" ]; then export PUBLIC_BOUNDARY_GIT_RANGE="$${CI_PREV_COMMIT_SHA}..$${CI_COMMIT_SHA}"; fi
93+
- scripts/check-public-boundary.sh

0 commit comments

Comments
 (0)