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