@@ -5,14 +5,15 @@ name: OpenAI4ContribTests
5
5
6
6
on :
7
7
pull_request :
8
- branches : [' main' ]
8
+ branches : [" main" ]
9
9
paths :
10
- - ' autogen/**'
11
- - ' test/agentchat/contrib/**'
12
- - ' .github/workflows/contrib-openai.yml'
13
- - ' setup.py'
14
- permissions : {}
15
- # actions: read
10
+ - " autogen/**"
11
+ - " test/agentchat/contrib/**"
12
+ - " .github/workflows/contrib-openai.yml"
13
+ - " setup.py"
14
+ permissions :
15
+ {}
16
+ # actions: read
16
17
# checks: read
17
18
# contents: read
18
19
# deployments: read
55
56
python -m pip install --upgrade pip wheel
56
57
pip install -e .
57
58
python -c "import autogen"
58
- pip install coverage pytest-asyncio
59
+ pip install pytest-cov>=5 pytest-asyncio
59
60
- name : Install packages for test when needed
60
61
run : |
61
62
pip install docker
67
68
AZURE_OPENAI_API_BASE : ${{ secrets.AZURE_OPENAI_API_BASE }}
68
69
OAI_CONFIG_LIST : ${{ secrets.OAI_CONFIG_LIST }}
69
70
run : |
70
- coverage run -a -m pytest -k test_retrievechat test/agentchat/contrib/retrievechat
71
- coverage xml
71
+ pytest test/agentchat/contrib/retrievechat/ test/agentchat/contrib/retrievechat
72
72
- name : Upload coverage to Codecov
73
73
uses : codecov/codecov-action@v3
74
74
with :
98
98
python -m pip install --upgrade pip wheel
99
99
pip install -e .
100
100
python -c "import autogen"
101
- pip install coverage pytest-asyncio
101
+ pip install pytest-cov>=5 pytest-asyncio
102
102
- name : Install packages for test when needed
103
103
run : |
104
104
pip install docker
@@ -109,8 +109,7 @@ jobs:
109
109
AZURE_OPENAI_API_BASE : ${{ secrets.AZURE_OPENAI_API_BASE }}
110
110
OAI_CONFIG_LIST : ${{ secrets.OAI_CONFIG_LIST }}
111
111
run : |
112
- coverage run -a -m pytest test/agentchat/contrib/test_compressible_agent.py
113
- coverage xml
112
+ pytest test/agentchat/contrib/test_compressible_agent.py
114
113
- name : Upload coverage to Codecov
115
114
uses : codecov/codecov-action@v3
116
115
with :
@@ -139,7 +138,7 @@ jobs:
139
138
python -m pip install --upgrade pip wheel
140
139
pip install -e .
141
140
python -c "import autogen"
142
- pip install coverage pytest-asyncio
141
+ pip install pytest-cov>=5 pytest-asyncio
143
142
- name : Install packages for test when needed
144
143
run : |
145
144
pip install docker
@@ -150,8 +149,7 @@ jobs:
150
149
AZURE_OPENAI_API_BASE : ${{ secrets.AZURE_OPENAI_API_BASE }}
151
150
OAI_CONFIG_LIST : ${{ secrets.OAI_CONFIG_LIST }}
152
151
run : |
153
- coverage run -a -m pytest test/agentchat/contrib/test_gpt_assistant.py
154
- coverage xml
152
+ pytest test/agentchat/contrib/test_gpt_assistant.py
155
153
- name : Upload coverage to Codecov
156
154
uses : codecov/codecov-action@v3
157
155
with :
@@ -180,16 +178,15 @@ jobs:
180
178
python -m pip install --upgrade pip wheel
181
179
pip install -e .[teachable]
182
180
python -c "import autogen"
183
- pip install coverage pytest
181
+ pip install pytest-cov>=5
184
182
- name : Coverage
185
183
env :
186
184
OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
187
185
AZURE_OPENAI_API_KEY : ${{ secrets.AZURE_OPENAI_API_KEY }}
188
186
AZURE_OPENAI_API_BASE : ${{ secrets.AZURE_OPENAI_API_BASE }}
189
187
OAI_CONFIG_LIST : ${{ secrets.OAI_CONFIG_LIST }}
190
188
run : |
191
- coverage run -a -m pytest test/agentchat/contrib/capabilities/test_teachable_agent.py
192
- coverage xml
189
+ pytest test/agentchat/contrib/capabilities/test_teachable_agent.py
193
190
- name : Upload coverage to Codecov
194
191
uses : codecov/codecov-action@v3
195
192
with :
@@ -198,8 +195,8 @@ jobs:
198
195
AgentBuilder :
199
196
strategy :
200
197
matrix :
201
- os : [ ubuntu-latest ]
202
- python-version : [ "3.11" ]
198
+ os : [ubuntu-latest]
199
+ python-version : ["3.11"]
203
200
runs-on : ${{ matrix.os }}
204
201
environment : openai1
205
202
steps :
@@ -218,7 +215,7 @@ jobs:
218
215
python -m pip install --upgrade pip wheel
219
216
pip install -e .
220
217
python -c "import autogen"
221
- pip install coverage pytest-asyncio
218
+ pip install pytest-cov>=5 pytest-asyncio
222
219
- name : Install packages for test when needed
223
220
run : |
224
221
pip install -e .[autobuild]
@@ -229,8 +226,7 @@ jobs:
229
226
AZURE_OPENAI_API_BASE : ${{ secrets.AZURE_OPENAI_API_BASE }}
230
227
OAI_CONFIG_LIST : ${{ secrets.OAI_CONFIG_LIST }}
231
228
run : |
232
- coverage run -a -m pytest test/agentchat/contrib/test_agent_builder.py
233
- coverage xml
229
+ pytest test/agentchat/contrib/test_agent_builder.py
234
230
- name : Upload coverage to Codecov
235
231
uses : codecov/codecov-action@v3
236
232
with :
@@ -259,7 +255,7 @@ jobs:
259
255
python -m pip install --upgrade pip wheel
260
256
pip install -e .[websurfer]
261
257
python -c "import autogen"
262
- pip install coverage pytest
258
+ pip install pytest-cov>=5
263
259
- name : Coverage
264
260
env :
265
261
OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
@@ -268,93 +264,90 @@ jobs:
268
264
OAI_CONFIG_LIST : ${{ secrets.OAI_CONFIG_LIST }}
269
265
BING_API_KEY : ${{ secrets.BING_API_KEY }}
270
266
run : |
271
- coverage run -a -m pytest test/agentchat/contrib/test_web_surfer.py
272
- coverage xml
267
+ pytest test/agentchat/contrib/test_web_surfer.py
273
268
- name : Upload coverage to Codecov
274
269
uses : codecov/codecov-action@v3
275
270
with :
276
271
file : ./coverage.xml
277
272
flags : unittests
278
273
ContextHandling :
279
- strategy :
280
- matrix :
281
- os : [ubuntu-latest]
282
- python-version : ["3.11"]
283
- runs-on : ${{ matrix.os }}
284
- environment : openai1
285
- steps :
286
- # checkout to pr branch
287
- - name : Checkout
288
- uses : actions/checkout@v4
289
- with :
290
- ref : ${{ github.event.pull_request.head.sha }}
291
- - name : Set up Python ${{ matrix.python-version }}
292
- uses : actions/setup-python@v5
293
- with :
294
- python-version : ${{ matrix.python-version }}
295
- - name : Install packages and dependencies
296
- run : |
297
- docker --version
298
- python -m pip install --upgrade pip wheel
299
- pip install -e .
300
- python -c "import autogen"
301
- pip install coverage pytest
302
- - name : Coverage
303
- env :
304
- OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
305
- AZURE_OPENAI_API_KEY : ${{ secrets.AZURE_OPENAI_API_KEY }}
306
- AZURE_OPENAI_API_BASE : ${{ secrets.AZURE_OPENAI_API_BASE }}
307
- OAI_CONFIG_LIST : ${{ secrets.OAI_CONFIG_LIST }}
308
- BING_API_KEY : ${{ secrets.BING_API_KEY }}
309
- run : |
310
- coverage run -a -m pytest test/agentchat/contrib/capabilities/test_context_handling.py
311
- coverage xml
312
- - name : Upload coverage to Codecov
313
- uses : codecov/codecov-action@v3
314
- with :
315
- file : ./coverage.xml
316
- flags : unittests
274
+ strategy :
275
+ matrix :
276
+ os : [ubuntu-latest]
277
+ python-version : ["3.11"]
278
+ runs-on : ${{ matrix.os }}
279
+ environment : openai1
280
+ steps :
281
+ # checkout to pr branch
282
+ - name : Checkout
283
+ uses : actions/checkout@v4
284
+ with :
285
+ ref : ${{ github.event.pull_request.head.sha }}
286
+ - name : Set up Python ${{ matrix.python-version }}
287
+ uses : actions/setup-python@v5
288
+ with :
289
+ python-version : ${{ matrix.python-version }}
290
+ - name : Install packages and dependencies
291
+ run : |
292
+ docker --version
293
+ python -m pip install --upgrade pip wheel
294
+ pip install -e .
295
+ python -c "import autogen"
296
+ pip install pytest-cov>=5
297
+ - name : Coverage
298
+ env :
299
+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
300
+ AZURE_OPENAI_API_KEY : ${{ secrets.AZURE_OPENAI_API_KEY }}
301
+ AZURE_OPENAI_API_BASE : ${{ secrets.AZURE_OPENAI_API_BASE }}
302
+ OAI_CONFIG_LIST : ${{ secrets.OAI_CONFIG_LIST }}
303
+ BING_API_KEY : ${{ secrets.BING_API_KEY }}
304
+ run : |
305
+ pytest test/agentchat/contrib/capabilities/test_context_handling.py
306
+ - name : Upload coverage to Codecov
307
+ uses : codecov/codecov-action@v3
308
+ with :
309
+ file : ./coverage.xml
310
+ flags : unittests
317
311
ImageGen :
318
- strategy :
319
- matrix :
320
- os : [ubuntu-latest]
321
- python-version : ["3.12"]
322
- runs-on : ${{ matrix.os }}
323
- environment : openai1
324
- steps :
325
- # checkout to pr branch
326
- - name : Checkout
327
- uses : actions/checkout@v4
328
- with :
329
- ref : ${{ github.event.pull_request.head.sha }}
330
- - name : Set up Python ${{ matrix.python-version }}
331
- uses : actions/setup-python@v5
332
- with :
333
- python-version : ${{ matrix.python-version }}
334
- - name : Install packages and dependencies
335
- run : |
336
- docker --version
337
- python -m pip install --upgrade pip wheel
338
- pip install -e .[lmm]
339
- python -c "import autogen"
340
- pip install coverage pytest
341
- - name : Coverage
342
- env :
343
- OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
344
- run : |
345
- coverage run -a -m pytest test/agentchat/contrib/capabilities/test_image_generation_capability.py
346
- coverage xml
347
- - name : Upload coverage to Codecov
348
- uses : codecov/codecov-action@v3
349
- with :
350
- file : ./coverage.xml
351
- flags : unittests
312
+ strategy :
313
+ matrix :
314
+ os : [ubuntu-latest]
315
+ python-version : ["3.12"]
316
+ runs-on : ${{ matrix.os }}
317
+ environment : openai1
318
+ steps :
319
+ # checkout to pr branch
320
+ - name : Checkout
321
+ uses : actions/checkout@v4
322
+ with :
323
+ ref : ${{ github.event.pull_request.head.sha }}
324
+ - name : Set up Python ${{ matrix.python-version }}
325
+ uses : actions/setup-python@v5
326
+ with :
327
+ python-version : ${{ matrix.python-version }}
328
+ - name : Install packages and dependencies
329
+ run : |
330
+ docker --version
331
+ python -m pip install --upgrade pip wheel
332
+ pip install -e .[lmm]
333
+ python -c "import autogen"
334
+ pip install pytest-cov>=5
335
+ - name : Coverage
336
+ env :
337
+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
338
+ run : |
339
+ pytest test/agentchat/contrib/capabilities/test_image_generation_capability.py
340
+ - name : Upload coverage to Codecov
341
+ uses : codecov/codecov-action@v3
342
+ with :
343
+ file : ./coverage.xml
344
+ flags : unittests
352
345
353
346
AgentOptimizer :
354
347
strategy :
355
348
matrix :
356
- os : [ ubuntu-latest ]
357
- python-version : [ "3.11" ]
349
+ os : [ubuntu-latest]
350
+ python-version : ["3.11"]
358
351
runs-on : ${{ matrix.os }}
359
352
environment : openai1
360
353
steps :
@@ -373,16 +366,15 @@ jobs:
373
366
python -m pip install --upgrade pip wheel
374
367
pip install -e .
375
368
python -c "import autogen"
376
- pip install coverage pytest
369
+ pip install pytest-cov>=5
377
370
- name : Coverage
378
371
env :
379
372
OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
380
373
AZURE_OPENAI_API_KEY : ${{ secrets.AZURE_OPENAI_API_KEY }}
381
374
AZURE_OPENAI_API_BASE : ${{ secrets.AZURE_OPENAI_API_BASE }}
382
375
OAI_CONFIG_LIST : ${{ secrets.OAI_CONFIG_LIST }}
383
376
run : |
384
- coverage run -a -m pytest test/agentchat/contrib/test_agent_optimizer.py
385
- coverage xml
377
+ pytest test/agentchat/contrib/test_agent_optimizer.py
386
378
- name : Upload coverage to Codecov
387
379
uses : codecov/codecov-action@v3
388
380
with :
0 commit comments