Skip to content

Commit 73f8612

Browse files
ashwin-antclaude
andauthored
Add CI workflow for Claude Code SDK e2e testing (#154)
## Summary - Added GitHub Actions workflow to test SDK integration with Claude Code CLI - Tests run on PR open/synchronize events across Python 3.10-3.13 ## Test plan - [x] Workflow triggers on PR events - [x] Installs Claude Code CLI via official script - [x] Runs quickstart example - [x] Runs streaming_mode example 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent ff4fe89 commit 73f8612

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/test-e2e.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Claude Code E2E Test
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
jobs:
8+
integration-test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ["3.10", "3.11", "3.12", "3.13"]
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Install Claude Code
23+
run: |
24+
curl -fsSL https://claude.ai/install.sh | bash
25+
echo "$HOME/.local/bin" >> $GITHUB_PATH
26+
27+
- name: Verify Claude Code installation
28+
run: claude -v
29+
30+
- name: Install Python dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install -e .
34+
35+
- name: Run quickstart example
36+
run: python examples/quick_start.py
37+
env:
38+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
39+
40+
- name: Run streaming mode examples
41+
run: timeout 120 python examples/streaming_mode.py all
42+
env:
43+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

0 commit comments

Comments
 (0)