Skip to content

Merge pull request #206 from brownjuly2003-code/fix/health-view-sdk-m… #490

Merge pull request #206 from brownjuly2003-code/fix/health-view-sdk-m…

Merge pull request #206 from brownjuly2003-code/fix/health-view-sdk-m… #490

name: Staging Deploy
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
staging:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
AGENTFLOW_E2E_BASE_URL: http://127.0.0.1:8080
AGENTFLOW_E2E_CALLBACK_PORT: "18080"
HOST_LOOPBACK_PROXY_RANGE_START: "18080"
HOST_LOOPBACK_PROXY_RANGE_END: "18080"
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]
python -m pip install -e ./sdk
python -m pip install -r requirements.txt
python -m pip install click rich pyyaml pytest-timeout
- name: Prepare pytest temp directory
run: mkdir -p .tmp
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
- uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
with:
cluster_name: agentflow-staging
config: k8s/kind-config.yaml
- name: Lint Helm chart
run: helm lint helm/agentflow -f k8s/staging/values-staging.yaml
- name: Deploy staging
run: bash scripts/k8s_staging_up.sh
- name: Run rate-limit E2E against staging
run: python -m pytest tests/e2e/test_smoke.py::test_rate_limit_returns_429_after_threshold -v --tb=short
- name: Run remaining E2E suite against staging
run: python -m pytest tests/e2e/ -k "not test_rate_limit_returns_429_after_threshold" -v --tb=short
- name: Capture diagnostics on failure
if: failure()
run: |
kubectl get all --all-namespaces
kubectl get events --all-namespaces --sort-by='.lastTimestamp' | tail -100
for ns in agentflow default; do
for pod in $(kubectl get pods -n "$ns" -o name 2>/dev/null); do
echo "=== $ns/$pod ==="
kubectl describe -n "$ns" "$pod" || true
kubectl logs -n "$ns" "$pod" --tail=200 || true
done
done
- name: Tear down staging
if: always()
run: bash scripts/k8s_staging_down.sh