Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 38 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ on:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
Expand All @@ -37,10 +38,11 @@ jobs:
fail_ci_if_error: false

test-e2e:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
needs: test # Run after unit tests pass
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
Expand All @@ -51,11 +53,20 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install Claude Code
- name: Install Claude Code (Linux/macOS)
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
curl -fsSL https://claude.ai/install.sh | bash
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install Claude Code (Windows)
if: runner.os == 'Windows'
run: |
irm https://claude.ai/install.ps1 | iex
$claudePath = "$env:USERPROFILE\.local\bin"
echo "$claudePath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh

- name: Verify Claude Code installation
run: claude -v

Expand Down Expand Up @@ -85,11 +96,20 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install Claude Code
- name: Install Claude Code (Linux)
if: runner.os == 'Linux'
run: |
curl -fsSL https://claude.ai/install.sh | bash
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install Claude Code (Windows)
if: runner.os == 'Windows'
run: |
irm https://claude.ai/install.ps1 | iex
$claudePath = "$env:USERPROFILE\.local\bin"
echo "$claudePath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh

- name: Verify Claude Code installation
run: claude -v

Expand All @@ -98,9 +118,22 @@ jobs:
python -m pip install --upgrade pip
pip install -e .

- name: Run example scripts
- name: Run example scripts (Linux)
if: runner.os == 'Linux'
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
python examples/quick_start.py
timeout 120 python examples/streaming_mode.py all

- name: Run example scripts (Windows)
if: runner.os == 'Windows'
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
python examples/quick_start.py
$job = Start-Job { python examples/streaming_mode.py all }
Wait-Job $job -Timeout 120 | Out-Null
Stop-Job $job
Receive-Job $job
shell: pwsh
16 changes: 15 additions & 1 deletion e2e-tests/test_agents_and_settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""End-to-end tests for agents and setting sources with real Claude API calls."""

import asyncio
import sys
import tempfile
from pathlib import Path

Expand Down Expand Up @@ -80,6 +82,10 @@ async def test_setting_sources_default():
), f"outputStyle should be 'default', got: {output_style}"
break

# On Windows, wait for file handles to be released before cleanup
if sys.platform == "win32":
await asyncio.sleep(0.5)


@pytest.mark.e2e
@pytest.mark.asyncio
Expand Down Expand Up @@ -120,6 +126,10 @@ async def test_setting_sources_user_only():
), f"testcmd should NOT be available with user-only sources, got: {commands}"
break

# On Windows, wait for file handles to be released before cleanup
if sys.platform == "win32":
await asyncio.sleep(0.5)


@pytest.mark.e2e
@pytest.mark.asyncio
Expand Down Expand Up @@ -152,4 +162,8 @@ async def test_setting_sources_project_included():
assert (
output_style == "local-test-style"
), f"outputStyle should be from local settings, got: {output_style}"
break
break

# On Windows, wait for file handles to be released before cleanup
if sys.platform == "win32":
await asyncio.sleep(0.5)