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.
This commit is contained in:
parent
721cec5315
commit
502828f75c
2 changed files with 36 additions and 0 deletions
24
.github/workflows/ci.yaml
vendored
24
.github/workflows/ci.yaml
vendored
|
|
@ -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
|
||||
|
|
|
|||
12
conftest.py
Normal file
12
conftest.py
Normal file
|
|
@ -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/*"]
|
||||
Reference in a new issue