Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .kokoro/presubmit/unit_agentplatform_adk_py311.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Run unit tests for ADK on Python 3.11
env_vars: {
key: "NOX_SESSION"
value: "unit_agentplatform_adk-3.11"
}

# Run unit tests in parallel, splitting up by file
env_vars: {
key: "PYTEST_ADDOPTS"
value: "-n=auto --dist=loadscope"
}
13 changes: 13 additions & 0 deletions .kokoro/presubmit/unit_agentplatform_ag2_py311.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Run unit tests for AG2 on Python 3.11
env_vars: {
key: "NOX_SESSION"
value: "unit_agentplatform_ag2-3.11"
}

# Run unit tests in parallel, splitting up by file
env_vars: {
key: "PYTEST_ADDOPTS"
value: "-n=auto --dist=loadscope"
}
13 changes: 13 additions & 0 deletions .kokoro/presubmit/unit_agentplatform_langchain_py311.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Run unit tests for LangChain on Python 3.11
env_vars: {
key: "NOX_SESSION"
value: "unit_agentplatform_langchain-3.11"
}

# Run unit tests in parallel, splitting up by file
env_vars: {
key: "PYTEST_ADDOPTS"
value: "-n=auto --dist=loadscope"
}
108 changes: 102 additions & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@
)

UNIT_TEST_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
UNIT_TEST_LANGCHAIN_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
UNIT_TEST_AG2_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
UNIT_TEST_LLAMA_INDEX_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
UNIT_TEST_TEMPLATES_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
PYTHON_TO_RAY_VERSIONS = {
"3.10": ["2.33.0", "2.42.0"],
"3.11": ["2.42.0", "2.47.1"],
Expand Down Expand Up @@ -108,6 +106,9 @@
"unit_langchain",
"unit_ag2",
"unit_llama_index",
"unit_agentplatform_adk",
"unit_agentplatform_langchain",
"unit_agentplatform_ag2",
"system",
"cover",
"lint",
Expand Down Expand Up @@ -298,7 +299,102 @@ def unit_ray(session, ray):
)


@nox.session(python=UNIT_TEST_LANGCHAIN_PYTHON_VERSIONS)
@nox.session(python=UNIT_TEST_TEMPLATES_PYTHON_VERSIONS)
def unit_agentplatform_adk(session):
# Install all test dependencies, then install this package in-place.

constraints_path = str(CURRENT_DIRECTORY / "testing" / "constraints-adk.txt")
standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES
session.install(*standard_deps, "-c", constraints_path)

# Install adk extras
session.install("-e", ".[adk_testing]", "-c", constraints_path)

# Run py.test against the unit tests.
session.run(
"py.test",
"--quiet",
"--junitxml=unit_agentplatform_adk_sponge_log.xml",
"--cov=google",
"--cov-append",
"--cov-config=.coveragerc",
"--cov-report=",
"--cov-fail-under=0",
os.path.join(
"tests", "unit", "agentplatform", "frameworks", "test_frameworks_adk.py"
),
*session.posargs,
)


@nox.session(python=UNIT_TEST_TEMPLATES_PYTHON_VERSIONS)
def unit_agentplatform_langchain(session):
# Install all test dependencies, then install this package in-place.

constraints_path = str(CURRENT_DIRECTORY / "testing" / "constraints-langchain.txt")
standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES
session.install(*standard_deps, "-c", constraints_path)

# Install langchain extras
session.install("-e", ".[langchain_testing]", "-c", constraints_path)

# Run py.test against the unit tests.
session.run(
"py.test",
"--quiet",
"--junitxml=unit_agentplatform_langchain_sponge_log.xml",
"--cov=google",
"--cov-append",
"--cov-config=.coveragerc",
"--cov-report=",
"--cov-fail-under=0",
os.path.join(
"tests",
"unit",
"agentplatform",
"frameworks",
"test_frameworks_langchain.py",
),
os.path.join(
"tests",
"unit",
"agentplatform",
"frameworks",
"test_frameworks_langgraph.py",
),
*session.posargs,
)


@nox.session(python=UNIT_TEST_TEMPLATES_PYTHON_VERSIONS)
def unit_agentplatform_ag2(session):
# Install all test dependencies, then install this package in-place.

constraints_path = str(CURRENT_DIRECTORY / "testing" / "constraints-ag2.txt")
standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES
session.install(*standard_deps, "-c", constraints_path)

# Install ag2 extras
session.install("-e", ".[ag2_testing]", "-c", constraints_path)

# Run py.test against the unit tests.
session.run(
"py.test",
"--quiet",
"--junitxml=unit_agentplatform_ag2_sponge_log.xml",
"--cov=google",
"--cov-append",
"--cov-config=.coveragerc",
"--cov-report=",
"--cov-fail-under=0",
os.path.join(
"tests", "unit", "agentplatform", "frameworks", "test_frameworks_ag2.py"
),
*session.posargs,
)


@nox.session(python=UNIT_TEST_TEMPLATES_PYTHON_VERSIONS)
def unit_langchain(session):
# Install all test dependencies, then install this package in-place.

Expand All @@ -324,7 +420,7 @@ def unit_langchain(session):
)


@nox.session(python=UNIT_TEST_AG2_PYTHON_VERSIONS)
@nox.session(python=UNIT_TEST_TEMPLATES_PYTHON_VERSIONS)
def unit_ag2(session):
# Install all test dependencies, then install this package in-place.

Expand All @@ -350,7 +446,7 @@ def unit_ag2(session):
)


@nox.session(python=UNIT_TEST_LLAMA_INDEX_PYTHON_VERSIONS)
@nox.session(python=UNIT_TEST_TEMPLATES_PYTHON_VERSIONS)
def unit_llama_index(session):
# Install all test dependencies, then install this package in-place.

Expand Down
Empty file added testing/constraints-adk.txt
Empty file.
Loading