Skip to content
Merged
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
35 changes: 0 additions & 35 deletions .github/workflows/docs.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Until this workflow existed, nothing in the repo ran a test: release.yml only publishes.
# Two things had rotted quietly as a result - the docs never mentioned the LLM Judge Scorer
# surface 0.6.36 shipped, and tests/test_span_tree.py had been failing since 40c6f6e changed
# trace_tool_call()'s dual-write behaviour four days after the test was written.
#
# It runs the whole suite. Tests for optional extras (crewai, litellm, llamaindex, autogen,
# google-adk) skip themselves via pytest.importorskip when the extra is absent, so the base
# install is green - a skip is honest about not being covered here, where a failure would
# have drowned out real ones. Installing those extras to actually run them is a fair next
# step; it is a slower job, not a different one.
name: tests

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
# The version release.yml builds the published wheel with, and a current one.
python: ["3.9", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: pip install -e ".[langchain]" pytest
# tests/test_integration.py talks to the hosted API and skips itself without a key;
# no secret is passed here on purpose, so pull requests from forks behave the same.
- run: python -m pytest tests/ -q
3 changes: 3 additions & 0 deletions tests/test_integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def make_tracer() -> Tracer:
# ---------------------------------------------------------------------------

def test_adk_model_error_is_captured():
# google-adk is an optional extra; skip like the crewai/litellm/llamaindex/autogen tests
# below rather than failing on ImportError (importing the module raises when it is absent).
pytest.importorskip("google.adk")
from agentx.integrations.google_adk import AgentXADKPlugin

tracer = make_tracer()
Expand Down
12 changes: 11 additions & 1 deletion tests/test_span_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ def test_google_adk_emits_real_child_spans():
import asyncio
import types

# google-adk is an optional extra; skip like every other integration test here rather
# than failing on ImportError (importing the module raises when it is absent).
pytest.importorskip("google.adk")
from agentx.integrations.google_adk import AgentXADKPlugin

tracer = make_tracer()
Expand Down Expand Up @@ -529,6 +532,7 @@ def test_google_adk_model_error_is_captured():
import asyncio
import types

pytest.importorskip("google.adk")
from agentx.integrations.google_adk import AgentXADKPlugin

tracer = make_tracer()
Expand Down Expand Up @@ -581,7 +585,13 @@ def test_trace_tool_call_emits_real_child_span():
assert child["name"] == "policy_lookup"
assert child["parent_span_id"] == root["span_id"]
assert child["output"] == "digital purchases are final"
assert "tool_calls" not in root or root.get("tool_calls") in (None, [])
# ...and a summary of it also lands on the ROOT's flat tool_calls list. That dual-write is
# deliberate (40c6f6e): the child span feeds the trace detail's span tree, while the
# engine's built-in "Tool failure" check and the dashboard's Tool quality column read the
# root's flat list - before it, a failed trace_tool_call() was invisible to both surfaces.
# Asserted positively, and as exactly one entry, so a third write shows up here too.
assert [tc["name"] for tc in root["tool_calls"]] == ["policy_lookup"]
assert root["tool_calls"][0]["output"] == "digital purchases are final"


def test_trace_retrieval_emits_real_child_span():
Expand Down
Loading