Skip to content

refactor: enhance stream processing in Adapter class #138

refactor: enhance stream processing in Adapter class

refactor: enhance stream processing in Adapter class #138

Workflow file for this run

name: "Tests"
on: [pull_request]
jobs:
unit:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
- run: git checkout HEAD^2
- name: Build and start services
run: |
docker compose up -d
sleep 10
- name: Run Unit Tests
run: |
docker compose exec tests vendor/bin/phpunit --configuration phpunit.xml \
tests/Agents/AgentTest.php \
tests/Agents/SchemaTest.php \
tests/Agents/Messages \
tests/Agents/Roles \
tests/Agents/Schema
conversation:
name: "${{ matrix.provider }} Tests"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- provider: OpenAI
test: tests/Agents/Conversation/ConversationOpenAITest.php
env_key: LLM_KEY_OPENAI
- provider: Anthropic
test: tests/Agents/Conversation/ConversationAnthropicTest.php
env_key: LLM_KEY_ANTHROPIC
- provider: Deepseek
test: tests/Agents/Conversation/ConversationDeepseekTest.php
env_key: LLM_KEY_DEEPSEEK
- provider: XAI
test: tests/Agents/Conversation/ConversationXAITest.php
env_key: LLM_KEY_XAI
- provider: Perplexity
test: tests/Agents/Conversation/ConversationPerplexityTest.php
env_key: LLM_KEY_PERPLEXITY
- provider: Gemini
test: tests/Agents/Conversation/ConversationGeminiTest.php
env_key: LLM_KEY_GEMINI
- provider: OpenRouter
test: tests/Agents/Conversation/ConversationOpenRouterTest.php
env_key: LLM_KEY_OPENROUTER
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
- run: git checkout HEAD^2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run ${{ matrix.provider }} Tests
env:
LLM_KEY_ANTHROPIC: ${{ secrets.LLM_KEY_ANTHROPIC }}
LLM_KEY_OPENAI: ${{ secrets.LLM_KEY_OPENAI }}
LLM_KEY_DEEPSEEK: ${{ secrets.LLM_KEY_DEEPSEEK }}
LLM_KEY_XAI: ${{ secrets.LLM_KEY_XAI }}
LLM_KEY_PERPLEXITY: ${{ secrets.LLM_KEY_PERPLEXITY }}
LLM_KEY_GEMINI: ${{ secrets.LLM_KEY_GEMINI }}
LLM_KEY_OPENROUTER: ${{ secrets.LLM_KEY_OPENROUTER }}
run: vendor/bin/phpunit --configuration phpunit.xml ${{ matrix.test }}
diffcheck:
name: DiffCheck Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
- run: git checkout HEAD^2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run DiffCheck Tests
env:
LLM_KEY_OPENAI: ${{ secrets.LLM_KEY_OPENAI }}
run: vendor/bin/phpunit --configuration phpunit.xml tests/Agents/DiffCheck