@devries-cameron20 / composio-1 / commits / 8f3088b78
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

ci(py): run skipped provider tests in the unit-test job (#4631)

This PR: - installs the `gemini`, `google`, `openai_agents`, and `claude_agent_sdk` providers in the `py.test.yml` unit-test job; previously `tests/test_gemini_provider.py` and `tests/test_google_provider.py` always skipped and the two provider packages' own tests never ran - makes the "Run Import Tests" step import `composio_gemini`, `composio_google`, and `google.genai`, so a missing dependency fails the job instead of silently skipping those tests - adds a "Run Provider Package Tests" step that runs `providers/openai_agents/tests` and `providers/claude_agent_sdk/tests` in separate pytest runs, because their `test_provider.py` shares a basename with `tests/test_provider.py` - mirrors both changes in the `nox -s tst` session (`make tst`) and updates the `python-testing` skill reference - verification: the combined dependencies resolve on Python 3.10, 3.11, and 3.12 (protobuf 6.33.6, no conflict with CrewAI); `nox -s tst` passes locally with 2119 passed and 4 expected skips (TypeSafe and Autogen run in their own steps, plus one Windows-only test), and the provider packages pass 6 and 16 tests Found during the test audit in https://github.com/ComposioHQ/composio/pull/4630.

Alberto Schiabel committed Sep 28, 2026 at 15:53 UTC 8f3088b78b8369e2246c52adc9d14717aa71e85b
3 files changed +33 -4
.agents/skills/python-testing/references/nox-make.md
+2 -2
@@ -30,11 +30,11 @@ Current sessions include:
30 - `chk`: Ruff check and mypy.
31 - `fix`: Ruff automatic fixes.
32 - `type_inference`: provider return-type inference checks.
33 -- `tst`: pytest test suite.
33 +- `tst`: pytest test suite, plus the `openai_agents` and `claude_agent_sdk` provider package tests.
34 - `tst_autogen`: Autogen regressions in an isolated protobuf-compatible environment.
35 - `snt`: sanity tests.
36
37 -When adding or renaming provider packages, inspect the `type_inference` session's explicit provider install list and checked test-file list.
37 +When adding or renaming provider packages, inspect the explicit provider install lists in the `tst` and `type_inference` sessions (and `.github/workflows/py.test.yml`), and the `type_inference` checked test-file list.
38
39 ## Test Placement
40
.github/workflows/py.test.yml
+16
@@ -92,6 +92,10 @@ jobs:
92 uv pip install -e providers/crewai
93 uv pip install -e providers/langchain
94 uv pip install -e providers/langgraph
95 + uv pip install -e providers/gemini
96 + uv pip install -e providers/google
97 + uv pip install -e providers/openai_agents
98 + uv pip install -e providers/claude_agent_sdk
99 uv pip install hypothesis pytest pytest-mock
100
101 - name: Run Import Tests
@@ -99,6 +103,9 @@ jobs:
103 cd python/
104 source .venv/bin/activate
105 python -c "from composio import Composio; print('✓ Basic import successful')"
106 + # The Gemini and Google provider tests skip when these are missing, so
107 + # fail here instead of letting the unit tests skip silently.
108 + python -c "import composio_gemini, composio_google, google.genai; print('✓ Gemini and Google provider imports successful')"
109
110 - name: Test Autogen Provider Installation
111 run: |
@@ -132,6 +139,15 @@ jobs:
139 source .venv/bin/activate
140 python -m pytest tests/ -v --tb=short
141
142 + - name: Run Provider Package Tests
143 + run: |
144 + cd python/
145 + source .venv/bin/activate
146 + # Separate runs: these files share the `test_provider.py` basename
147 + # with tests/, which pytest cannot collect in a single session.
148 + python -m pytest providers/openai_agents/tests -v --tb=short
149 + python -m pytest providers/claude_agent_sdk/tests -v --tb=short
150 +
151 - name: Test Package Installation
152 run: |
153 cd python/
python/noxfile.py
+15 -2
@@ -109,8 +109,21 @@ def tst(session: Session):
109 session.install("./providers/crewai")
110 session.install("./providers/langchain")
111 session.install("./providers/langgraph")
112 - test_paths = session.posargs or ["tests/"]
113 - session.run("pytest", *test_paths, "-v", "--tb=short")
112 + session.install("./providers/gemini")
113 + session.install("./providers/google")
114 + session.install("./providers/openai_agents")
115 + session.install("./providers/claude_agent_sdk")
116 + if session.posargs:
117 + session.run("pytest", *session.posargs, "-v", "--tb=short")
118 + return
119 + # Separate runs: the provider packages' `test_provider.py` files share a
120 + # basename with tests/, which pytest cannot collect in a single session.
121 + for test_path in (
122 + "tests/",
123 + "providers/openai_agents/tests",
124 + "providers/claude_agent_sdk/tests",
125 + ):
126 + session.run("pytest", test_path, "-v", "--tb=short")
127
128
129 @nox.session