-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (93 loc) · 3.24 KB
/
tests.yml
File metadata and controls
107 lines (93 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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