From 502828f75c238656222790c4e7c31725e3959ae9 Mon Sep 17 00:00:00 2001 From: Adam Moussa Date: Wed, 17 Jun 2026 15:19:51 -0400 Subject: [PATCH] Fix CI collection: isolate agent-team tests; add agent-team CI job Repo-root 'pytest --collect-only' failed with ImportPathMismatchError because agent-team/tests/ and the root tests/ are both the 'tests' package. Add a root conftest.py that excludes agent-team from the root collection, and a dedicated agent-team-tests CI job that runs the (API-key-free) agent-team suite in its own working dir. --- .github/workflows/ci.yaml | 24 ++++++++++++++++++++++++ conftest.py | 12 ++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 conftest.py diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f348552..72c7336 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -48,3 +48,27 @@ jobs: # Live test execution requires ANTHROPIC_API_KEY + COMPOSIO_API_KEY # and runs locally before push, not in CI. run: pytest --collect-only -q + + agent-team-tests: + # The agent-team/ subproject is self-contained (no API keys needed), so its + # suite RUNS in CI rather than only collecting. Its tests/ package collides + # with the repo-root tests/ under one rootdir, so it runs in its own dir. + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + cache-dependency-path: requirements.txt + + - name: Install dependencies + run: | + pip install -r requirements.txt + pip install pytest + + - name: Run agent-team suite + working-directory: agent-team + run: python -m pytest -q diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000..c371733 --- /dev/null +++ b/conftest.py @@ -0,0 +1,12 @@ +"""Root pytest configuration for the orchestrator repo. + +The ``agent-team/`` subproject ships its own ``tests/`` package with its own +``conftest.py`` and path bootstrap. Because both that directory and the repo's +top-level ``tests/`` are named ``tests`` (each with an ``__init__.py``), a single +repo-root ``pytest --collect-only`` maps both to the same ``tests`` package and +fails with ``ImportPathMismatchError``. The agent-team suite is therefore +collected/run by its OWN CI job (``cd agent-team && pytest``), and excluded from +the root collection here. +""" + +collect_ignore_glob = ["agent-team", "agent-team/*"]