mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-12-23 09:19:52 +00:00
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>
This commit is contained in:
parent
ff4fe897a5
commit
73f861235e
1 changed files with 43 additions and 0 deletions
43
.github/workflows/test-e2e.yml
vendored
Normal file
43
.github/workflows/test-e2e.yml
vendored
Normal 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 }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue