Add CI workflow for Claude Code SDK e2e testing (#154)
Some checks are pending
Lint / lint (push) Waiting to run
Test / test (3.10) (push) Waiting to run
Test / test (3.11) (push) Waiting to run
Test / test (3.12) (push) Waiting to run
Test / test (3.13) (push) Waiting to run

## 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>
This commit is contained in:
Ashwin Bhat 2025-09-06 22:41:53 -07:00 committed by GitHub
parent ff4fe897a5
commit 73f861235e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

43
.github/workflows/test-e2e.yml vendored Normal file
View file

@ -0,0 +1,43 @@
name: Claude Code E2E Test
on:
pull_request:
types: [opened, synchronize]
jobs:
integration-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Claude Code
run: |
curl -fsSL https://claude.ai/install.sh | bash
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Verify Claude Code installation
run: claude -v
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Run quickstart example
run: python examples/quick_start.py
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- name: Run streaming mode examples
run: timeout 120 python examples/streaming_mode.py all
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}