Repository navigation
408 lines (388 loc) · 15.4 KB
/
Copy pathmain.yml
File metadata and controls
408 lines (388 loc) · 15.4 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
name: tests
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch:
env:
UV_VERSION: "0.13.5"
jobs:
agentbricks_release_helper_test:
runs-on: ubuntu-latest
name: "agentbricks_release_helper_test (python: 3.11)"
timeout-minutes: 5
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.11"
- run: python -m unittest discover .github/scripts/tests
- run: python .github/agentbricks-reviewer/test_prompt.py
core_test:
runs-on: ubuntu-latest
name: "core_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Run tests
run: |
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group tests \
pytest --cov --cov-report=term tests/
core_test_with_extras:
runs-on: ubuntu-latest
name: "core_test_with_extras (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Run tests with extras
run: |
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group tests --extra memory \
pytest --cov --cov-report=term tests/
langchain_test:
runs-on: ubuntu-latest
name: "langchain_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Run tests
working-directory: integrations/langchain
run: |
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group tests pytest --cov --cov-report=term tests/unit_tests
langchain_test_with_extras:
runs-on: ubuntu-latest
name: "langchain_test_with_extras (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Run tests with extras
working-directory: integrations/langchain
run: |
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group tests --extra memory \
pytest --cov --cov-report=term tests/unit_tests
langchain_test_deepagents:
runs-on: ubuntu-latest
name: "langchain_test_deepagents (python: 3.11)"
# The deepagents extra requires Python >=3.11, so it is omitted from the 3.10
# jobs above (its unit tests importorskip there); run them here on 3.11.
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
python-version: "3.11"
- name: Run tests with deepagents extra
working-directory: integrations/langchain
run: |
uv run --exact --group tests --extra deepagents \
pytest --cov --cov-report=term tests/unit_tests
langchain_cross_version_test:
runs-on: ubuntu-latest
name: langchain_test (${{ matrix.python-version }}, ${{ matrix.version.name }})
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
version:
- { ref: "databricks-ai-v0.5.0", name: "v0.5.0" }
- { ref: "databricks-ai-v0.4.0", name: "v0.4.0" }
- { ref: "databricks-ai-v0.3.0", name: "v0.3.0" }
- { ref: "databricks-ai-v0.2.0", name: "v0.2.0" }
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install .
- name: Checkout langchain version
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
ref: ${{ matrix.version.ref }}
fetch-depth: 1
path: older-version
- name: Replace langchain with older version
run: |
# Remove current langchain if it exists to avoid conflicts
rm -rf integrations/langchain
# Copy older version of langchain to the main repo
cp -r older-version/integrations/langchain integrations/
- name: Install langchain dependency
run: |
pip install integrations/langchain --group dev
- name: Run tests
run: |
# Only testing initialization since functionality can change
pytest integrations/langchain/tests/unit_tests/test_vector_search_retriever_tool.py::test_init
pytest integrations/langchain/tests/unit_tests/test_genie.py
pytest integrations/langchain/tests/unit_tests/test_embeddings.py
pytest integrations/langchain/tests/unit_tests/test_chat_models.py
openai_test:
runs-on: ubuntu-latest
name: "openai_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Run tests
working-directory: integrations/openai
run: |
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group tests pytest --cov --cov-report=term tests/unit_tests
openai_test_with_extras:
runs-on: ubuntu-latest
name: "openai_test_with_extras (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Run tests with extras
working-directory: integrations/openai
run: |
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group tests --extra memory \
pytest --cov --cov-report=term tests/unit_tests
openai_cross_version_test:
runs-on: ubuntu-latest
name: openai_test (${{ matrix.python-version }}, ${{ matrix.version.name }})
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
version:
- { ref: "databricks-ai-v0.5.0", name: "v0.5.0" }
- { ref: "databricks-ai-v0.4.0", name: "v0.4.0" }
- { ref: "databricks-ai-v0.3.0", name: "v0.3.0" }
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: ${{ matrix.python-version }}
- name: Checkout openai version
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
ref: ${{ matrix.version.ref }}
fetch-depth: 1
path: older-version
- name: Install current core and historical OpenAI integration
run: |
pip install . older-version/integrations/openai --group dev
pip check
- name: Run maintained compatibility tests
run: |
pytest -c pyproject.toml integrations/openai/tests/compatibility
llamaindex_test:
runs-on: ubuntu-latest
name: "llamaindex_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Run tests
working-directory: integrations/llamaindex
run: |
uv run --resolution ${{ matrix.uv-resolution }} --exact --group tests pytest --cov --cov-report=term tests/unit_tests
mcp_test:
runs-on: ubuntu-latest
name: "mcp_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Run tests
working-directory: databricks_mcp
run: |
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group tests pytest --cov --cov-report=term tests/unit_tests
dspy_test:
runs-on: ubuntu-latest
name: "dspy_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Run tests
working-directory: integrations/dspy
run: |
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group tests pytest --cov --cov-report=term tests/unit_tests
agentbricks_test:
runs-on: ubuntu-latest
name: "agentbricks_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Run tests
working-directory: integrations/agentbricks
run: bash ../../.github/scripts/run_agentbricks_tests.sh unit "${{ matrix.uv-resolution }}"
agentbricks_framework_test:
runs-on: ubuntu-latest
name: "agentbricks_framework_test (python: 3.11, uv: highest)"
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
# Generated LangGraph agents require Python 3.11 or newer.
python-version: "3.11"
- name: Run tests with framework dependencies
working-directory: integrations/agentbricks
run: bash ../../.github/scripts/run_agentbricks_tests.sh framework
agentbricks_dev_functional:
runs-on: ${{ matrix.os }}
name: "agentbricks_dev_functional (${{ matrix.os }})"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install uv
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff
with:
version: ${{ env.UV_VERSION }}
python-version: "3.12"
# Every dev boot syncs a scaffolded agent's dependencies; keeping the downloaded wheels
# (unpruned, under this job's own key) spares each run re-downloading them per template.
cache-suffix: agentbricks-suites
prune-cache: false
# `agentbricks dev` runs the app through `databricks apps run-local`.
- name: Install the Databricks CLI
uses: databricks/setup-cli@e0f69d54c90e95ccad22d5ff17751da665e599a9
# The suites' fake workspace is verified against this CLI; with the action's default
# (0.295.0), `apps run-local` fails at startup with `strconv.ParseInt: parsing ""`.
with:
version: 1.22.1
# Build the wheels and run the E2E suites against a fake workspace from a venv they are
# installed into, so the tests exercise the shipped artifact (a packaging gap fails here)
# rather than an editable source tree. `agentbricks` on PATH is the wheel's console script,
# and the suites pin every scaffolded agent to the same wheels.
- name: Build the Agent Bricks wheels and run the suites
working-directory: integrations/agentbricks
run: bash ../../.github/scripts/run_agentbricks_tests.sh suites-fake
- name: Upload the suites' command logs
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: agentbricks-suites-logs-${{ matrix.os }}
path: ${{ runner.temp }}/agentbricks-e2e-*/logs
if-no-files-found: ignore