|
61 | 61 | ) |
62 | 62 |
|
63 | 63 | UNIT_TEST_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] |
| 64 | +UNIT_TEST_ADK_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] |
64 | 65 | UNIT_TEST_LANGCHAIN_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] |
65 | 66 | UNIT_TEST_AG2_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] |
66 | 67 | UNIT_TEST_LLAMA_INDEX_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] |
|
108 | 109 | "unit_langchain", |
109 | 110 | "unit_ag2", |
110 | 111 | "unit_llama_index", |
| 112 | + "unit_agentplatform_adk", |
| 113 | + "unit_agentplatform_langchain", |
| 114 | + "unit_agentplatform_ag2", |
111 | 115 | "system", |
112 | 116 | "cover", |
113 | 117 | "lint", |
@@ -298,6 +302,101 @@ def unit_ray(session, ray): |
298 | 302 | ) |
299 | 303 |
|
300 | 304 |
|
| 305 | +@nox.session(python=UNIT_TEST_ADK_PYTHON_VERSIONS) |
| 306 | +def unit_agentplatform_adk(session): |
| 307 | + # Install all test dependencies, then install this package in-place. |
| 308 | + |
| 309 | + constraints_path = str(CURRENT_DIRECTORY / "testing" / "constraints-adk.txt") |
| 310 | + standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES |
| 311 | + session.install(*standard_deps, "-c", constraints_path) |
| 312 | + |
| 313 | + # Install adk extras |
| 314 | + session.install("-e", ".[adk_testing]", "-c", constraints_path) |
| 315 | + |
| 316 | + # Run py.test against the unit tests. |
| 317 | + session.run( |
| 318 | + "py.test", |
| 319 | + "--quiet", |
| 320 | + "--junitxml=unit_agentplatform_adk_sponge_log.xml", |
| 321 | + "--cov=google", |
| 322 | + "--cov-append", |
| 323 | + "--cov-config=.coveragerc", |
| 324 | + "--cov-report=", |
| 325 | + "--cov-fail-under=0", |
| 326 | + os.path.join( |
| 327 | + "tests", "unit", "agentplatform", "frameworks", "test_frameworks_adk.py" |
| 328 | + ), |
| 329 | + *session.posargs, |
| 330 | + ) |
| 331 | + |
| 332 | + |
| 333 | +@nox.session(python=UNIT_TEST_LANGCHAIN_PYTHON_VERSIONS) |
| 334 | +def unit_agentplatform_langchain(session): |
| 335 | + # Install all test dependencies, then install this package in-place. |
| 336 | + |
| 337 | + constraints_path = str(CURRENT_DIRECTORY / "testing" / "constraints-langchain.txt") |
| 338 | + standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES |
| 339 | + session.install(*standard_deps, "-c", constraints_path) |
| 340 | + |
| 341 | + # Install langchain extras |
| 342 | + session.install("-e", ".[langchain_testing]", "-c", constraints_path) |
| 343 | + |
| 344 | + # Run py.test against the unit tests. |
| 345 | + session.run( |
| 346 | + "py.test", |
| 347 | + "--quiet", |
| 348 | + "--junitxml=unit_agentplatform_langchain_sponge_log.xml", |
| 349 | + "--cov=google", |
| 350 | + "--cov-append", |
| 351 | + "--cov-config=.coveragerc", |
| 352 | + "--cov-report=", |
| 353 | + "--cov-fail-under=0", |
| 354 | + os.path.join( |
| 355 | + "tests", |
| 356 | + "unit", |
| 357 | + "agentplatform", |
| 358 | + "frameworks", |
| 359 | + "test_frameworks_langchain.py", |
| 360 | + ), |
| 361 | + os.path.join( |
| 362 | + "tests", |
| 363 | + "unit", |
| 364 | + "agentplatform", |
| 365 | + "frameworks", |
| 366 | + "test_frameworks_langgraph.py", |
| 367 | + ), |
| 368 | + *session.posargs, |
| 369 | + ) |
| 370 | + |
| 371 | + |
| 372 | +@nox.session(python=UNIT_TEST_AG2_PYTHON_VERSIONS) |
| 373 | +def unit_agentplatform_ag2(session): |
| 374 | + # Install all test dependencies, then install this package in-place. |
| 375 | + |
| 376 | + constraints_path = str(CURRENT_DIRECTORY / "testing" / "constraints-ag2.txt") |
| 377 | + standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES |
| 378 | + session.install(*standard_deps, "-c", constraints_path) |
| 379 | + |
| 380 | + # Install ag2 extras |
| 381 | + session.install("-e", ".[ag2_testing]", "-c", constraints_path) |
| 382 | + |
| 383 | + # Run py.test against the unit tests. |
| 384 | + session.run( |
| 385 | + "py.test", |
| 386 | + "--quiet", |
| 387 | + "--junitxml=unit_agentplatform_ag2_sponge_log.xml", |
| 388 | + "--cov=google", |
| 389 | + "--cov-append", |
| 390 | + "--cov-config=.coveragerc", |
| 391 | + "--cov-report=", |
| 392 | + "--cov-fail-under=0", |
| 393 | + os.path.join( |
| 394 | + "tests", "unit", "agentplatform", "frameworks", "test_frameworks_ag2.py" |
| 395 | + ), |
| 396 | + *session.posargs, |
| 397 | + ) |
| 398 | + |
| 399 | + |
301 | 400 | @nox.session(python=UNIT_TEST_LANGCHAIN_PYTHON_VERSIONS) |
302 | 401 | def unit_langchain(session): |
303 | 402 | # Install all test dependencies, then install this package in-place. |
|
0 commit comments