|
| 1 | +name: Agent E2E |
| 2 | + |
| 3 | +# Runs the agent e2e suites (conductor-ai-e2e/) against the Conductor OSS |
| 4 | +# server boot JAR (Maven Central) — the server this SDK ships against, with |
| 5 | +# the agent runtime on by default from 3.32.0-rc.8 onward. The Agentspan |
| 6 | +# server JAR is no longer used here. |
| 7 | +# |
| 8 | +# These tests call real LLMs via the OPENAI_API_KEY / ANTHROPIC_API_KEY |
| 9 | +# repo secrets. The suites themselves never read the keys (asserted by |
| 10 | +# Suite2ToolCallingCredentials) — only the server process gets them. |
| 11 | +# Fork PRs cannot see repo secrets, so for them the run fails at the |
| 12 | +# silently-empty guard rather than passing vacuously. |
| 13 | + |
| 14 | +on: [pull_request, workflow_dispatch] |
| 15 | + |
| 16 | +permissions: |
| 17 | + contents: read |
| 18 | + |
| 19 | +concurrency: |
| 20 | + group: agent-e2e-${{ github.ref }} |
| 21 | + cancel-in-progress: true |
| 22 | + |
| 23 | +env: |
| 24 | + CONDUCTOR_SERVER_VERSION: "3.32.0-rc.8" # pinned server release — bump deliberately |
| 25 | + |
| 26 | +jobs: |
| 27 | + agent-e2e: |
| 28 | + runs-on: ubuntu-latest |
| 29 | + timeout-minutes: 45 |
| 30 | + env: |
| 31 | + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
| 32 | + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} |
| 33 | + AGENTSPAN_SERVER_URL: http://localhost:8080/api |
| 34 | + steps: |
| 35 | + - name: Checkout code |
| 36 | + uses: actions/checkout@v4 |
| 37 | + |
| 38 | + - name: Set up Java |
| 39 | + uses: actions/setup-java@v4 |
| 40 | + with: |
| 41 | + distribution: temurin |
| 42 | + java-version: '21' |
| 43 | + |
| 44 | + # Python is only needed for mcp-testkit and the XML guard. |
| 45 | + # No `cache: pip` — it hard-fails without a requirements file. |
| 46 | + - name: Set up Python |
| 47 | + uses: actions/setup-python@v5 |
| 48 | + with: |
| 49 | + python-version: '3.12' |
| 50 | + |
| 51 | + - name: Cache server JAR |
| 52 | + id: jar_cache |
| 53 | + uses: actions/cache@v4 |
| 54 | + with: |
| 55 | + path: conductor-server.jar |
| 56 | + key: conductor-oss-server-${{ env.CONDUCTOR_SERVER_VERSION }} |
| 57 | + |
| 58 | + - name: Download server JAR from Maven Central |
| 59 | + if: steps.jar_cache.outputs.cache-hit != 'true' |
| 60 | + run: | |
| 61 | + curl -fL --retry 3 -o conductor-server.jar \ |
| 62 | + "https://repo1.maven.org/maven2/org/conductoross/conductor-server/${CONDUCTOR_SERVER_VERSION}/conductor-server-${CONDUCTOR_SERVER_VERSION}-boot.jar" |
| 63 | +
|
| 64 | + - name: Install mcp-testkit |
| 65 | + run: | |
| 66 | + python -m pip install --upgrade pip |
| 67 | + pip install mcp-testkit |
| 68 | +
|
| 69 | + - name: Start mcp-testkit |
| 70 | + run: | |
| 71 | + mcp-testkit --transport http --port 3001 & |
| 72 | + sleep 2 |
| 73 | +
|
| 74 | + - name: Start server |
| 75 | + run: | |
| 76 | + java -jar conductor-server.jar --server.port=8080 > server.log 2>&1 & |
| 77 | +
|
| 78 | + - name: Wait for server health |
| 79 | + run: | |
| 80 | + for i in $(seq 1 45); do |
| 81 | + if curl -sf http://localhost:8080/health | grep -q '"healthy"[[:space:]]*:[[:space:]]*true'; then |
| 82 | + echo "server healthy after ~$((i*2))s"; exit 0 |
| 83 | + fi |
| 84 | + sleep 2 |
| 85 | + done |
| 86 | + echo "::error::server failed to become healthy within 90s" |
| 87 | + tail -100 server.log |
| 88 | + exit 1 |
| 89 | +
|
| 90 | + - name: Run e2e suites |
| 91 | + run: ./gradlew :conductor-ai-e2e:test -Pe2e |
| 92 | + |
| 93 | + # BaseTest assumeTrue-skips every suite when the server is unreachable — |
| 94 | + # without this guard a boot failure after the health gate (or a future |
| 95 | + # gate regression) would yield a green job that ran nothing. |
| 96 | + - name: Guard against silently-empty runs |
| 97 | + if: always() |
| 98 | + run: | |
| 99 | + python - <<'EOF' |
| 100 | + import glob |
| 101 | + import sys |
| 102 | + import xml.etree.ElementTree as ET |
| 103 | +
|
| 104 | + total = executed = 0 |
| 105 | + for path in glob.glob("conductor-ai-e2e/build/test-results/test/TEST-*.xml"): |
| 106 | + root = ET.parse(path).getroot() |
| 107 | + t = int(root.get("tests", 0)) |
| 108 | + sk = int(root.get("skipped", 0)) |
| 109 | + total += t |
| 110 | + executed += t - sk |
| 111 | + print(f"executed {executed}/{total} tests") |
| 112 | + sys.exit(0 if executed > 0 else 1) |
| 113 | + EOF |
| 114 | +
|
| 115 | + - name: Upload results |
| 116 | + if: always() |
| 117 | + uses: actions/upload-artifact@v4 |
| 118 | + with: |
| 119 | + name: agent-e2e-results |
| 120 | + path: | |
| 121 | + conductor-ai-e2e/build/test-results/test/ |
| 122 | + conductor-ai-e2e/build/reports/tests/test/ |
| 123 | + server.log |
| 124 | + retention-days: 14 |
0 commit comments