From 73f861235e5a8a62484bbf4594e2c1cb4239613a Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Sat, 6 Sep 2025 22:41:53 -0700 Subject: [PATCH] Add CI workflow for Claude Code SDK e2e testing (#154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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 --- .github/workflows/test-e2e.yml | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/test-e2e.yml diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml new file mode 100644 index 0000000..b9ffdb1 --- /dev/null +++ b/.github/workflows/test-e2e.yml @@ -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 }}