Skip to content

Commit ccbd5cf

Browse files
declan-scaleclaude
andcommitted
ci(tutorials): conditionally install claude-code/codex CLI + enable their gated live tests
Only for *claude_code* / *codex* tutorials (no-op for others). Installs the CLI via npm (mirrors the golden-agent sandbox image) and sets CLAUDE_LIVE_TESTS/CODEX_LIVE_TESTS so the gated live agent tests run. Requires the TUTORIAL_ANTHROPIC_API_KEY secret. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent df3461c commit ccbd5cf

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/agentex-tutorials-test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,24 @@ jobs:
4949
curl -LsSf https://astral.sh/uv/install.sh | sh
5050
echo "$HOME/.local/bin" >> $GITHUB_PATH
5151
52+
# Subprocess-CLI harnesses: install the relevant CLI only for the
53+
# claude-code / codex tutorials (no-op for every other tutorial). npm is
54+
# preinstalled on ubuntu runners. Versions mirror the golden agent's
55+
# sandbox image.
56+
- name: Install harness CLI (claude-code / codex only)
57+
if: ${{ contains(matrix.tutorial, 'claude_code') || contains(matrix.tutorial, 'codex') }}
58+
run: |
59+
if [[ "${{ matrix.tutorial }}" == *claude_code* ]]; then
60+
echo "📦 Installing Claude Code CLI..."
61+
npm install -g @anthropic-ai/claude-code
62+
claude --version || true
63+
fi
64+
if [[ "${{ matrix.tutorial }}" == *codex* ]]; then
65+
echo "📦 Installing Codex CLI..."
66+
npm install -g @openai/codex
67+
codex --version || true
68+
fi
69+
5270
- name: Pull latest AgentEx image
5371
run: |
5472
echo "🐳 Pulling latest Scale AgentEx Docker image..."
@@ -136,6 +154,11 @@ jobs:
136154
working-directory: ./examples/tutorials
137155
env:
138156
OPENAI_API_KEY: ${{ secrets.TUTORIAL_OPENAI_API_KEY }}
157+
ANTHROPIC_API_KEY: ${{ secrets.TUTORIAL_ANTHROPIC_API_KEY }}
158+
# Enable the gated live tests only for the matching subprocess-CLI
159+
# harness tutorial (the CLI is installed for it in the step above).
160+
CLAUDE_LIVE_TESTS: ${{ contains(matrix.tutorial, 'claude_code') && '1' || '' }}
161+
CODEX_LIVE_TESTS: ${{ contains(matrix.tutorial, 'codex') && '1' || '' }}
139162
HEALTH_CHECK_PORT: 8080 # Use non-privileged port for temporal worker health checks
140163
run: |
141164
echo "Testing tutorial: ${{ matrix.tutorial }}"

0 commit comments

Comments
 (0)