Skip to content

Testing and CI

weego edited this page Jun 5, 2026 · 2 revisions

Testing and CI

LightAgent uses focused tests for core behavior and GitHub Actions for Python version coverage.

Local Focused Tests

From the repository root:

python -m compileall -q LightAgent tests/test_v065_core.py tests/test_v070_tracing.py tests/test_memory_policy.py tests/test_lightflow.py
PYTHONPATH=. python -m pytest -q tests/test_v065_core.py tests/test_v070_tracing.py tests/test_memory_policy.py tests/test_lightflow.py

These tests cover structured result compatibility, runtime tools, structured stream events, trace events, memory policy behavior, and LightFlow dependency ordering, retries, result formats, and flow trace events.

CI Matrix

The GitHub Actions workflow runs on:

  • Python 3.10
  • Python 3.11
  • Python 3.12

CI steps:

  1. install requirements
  2. compile LightAgent
  3. run focused pytest suite

Workflow file:

.github/workflows/ci.yml

Example Smoke Tests

For manual checks, run examples one capability at a time:

python example/01.single_agent.py
python example/02.tools_agent.py
python example/04.multi_agent.py
python example/10.lightflow.py

Examples that call external providers require valid credentials. Memory, MCP, and browser examples require extra setup.

PR Checklist

  • Keep changes scoped.
  • Preserve default agent.run() compatibility unless a breaking change is intentional.
  • Add tests for new runtime behavior.
  • Update Wiki or docs for public API changes.
  • Run focused tests locally before opening a PR.

Clone this wiki locally