Skip to content

Commit 1862c71

Browse files
author
Kowser
committed
Add agent import smoke test and [agents]-extra test job to PR CI
Extends the existing single unit-test job (rather than adding a new job) to match its established pattern: per-step continue-on-error + a final aggregating "Check test results" gate. - "Verify agents import without extras installed" runs right after the existing base `pip install -e .` step (already extras-free) and before any agents-specific install, so it genuinely exercises the no-extras case -- this is the regression class the Stage 1 langchain.py fix addressed. - "Install agents extra" + "Run agent tests" run after the three existing suites, installing `.[agents]` plus pytest-asyncio. pytest-asyncio is required explicitly here: it's declared in [tool.poetry.group.dev.dependencies], but this workflow installs via plain pip (not `poetry install`), which never sees poetry dependency groups -- confirmed by simulating the exact CI command sequence in a fresh venv, which reproduced 30 async-test failures ("async def functions are not natively supported") until pytest-asyncio was installed explicitly. pytest-xdist and pytest-rerunfailures (also dev-group-only) are not added since nothing in tests/ai depends on either. - Both new steps feed the existing coverage-file-per-suite + `coverage combine` pattern automatically (the combine step already globs `.coverage.*`), and both are added to the final "Check test results" gate. Verified by replicating this exact install/test sequence end-to-end in a throwaway venv: base install + smoke test, all three existing suites, agents-extra install, agent suite, coverage combine across all 4 files -- all green (1683 agent tests passed, existing suites unaffected). e2e/ is intentionally not wired in here (still-open item: what server these hit once Agentspan's own is discarded).
1 parent dc6415f commit 1862c71

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/pull_request.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ jobs:
2727
pip install -e .
2828
pip install pytest pytest-cov coverage
2929
30+
- name: Verify agents import without extras installed
31+
id: agent_base_import
32+
continue-on-error: true
33+
run: |
34+
python -c "import conductor.ai.agents"
35+
3036
- name: Prepare coverage directory
3137
run: |
3238
mkdir -p ${{ env.COVERAGE_DIR }}
@@ -64,6 +70,19 @@ jobs:
6470
run: |
6571
coverage run -m pytest tests/serdesertest -v
6672
73+
- name: Install agents extra
74+
run: |
75+
pip install -e '.[agents]'
76+
pip install pytest-asyncio
77+
78+
- name: Run agent tests
79+
id: agent_tests
80+
continue-on-error: true
81+
env:
82+
COVERAGE_FILE: ${{ env.COVERAGE_DIR }}/.coverage.agents
83+
run: |
84+
coverage run -m pytest tests/ai -m "not integration and not e2e" -v
85+
6786
- name: Generate coverage report
6887
id: coverage_report
6988
run: |
@@ -91,5 +110,5 @@ jobs:
91110
file: coverage.xml
92111

93112
- name: Check test results
94-
if: steps.unit_tests.outcome == 'failure' || steps.bc_tests.outcome == 'failure' || steps.serdeser_tests.outcome == 'failure'
113+
if: steps.unit_tests.outcome == 'failure' || steps.bc_tests.outcome == 'failure' || steps.serdeser_tests.outcome == 'failure' || steps.agent_base_import.outcome == 'failure' || steps.agent_tests.outcome == 'failure'
95114
run: exit 1

0 commit comments

Comments
 (0)