mirror of
https://github.com/shareAI-lab/analysis_claude_code.git
synced 2026-02-04 13:16:37 +08:00
Unit tests (no API required): - test_imports: All agent modules importable - test_todo_manager_basic: TodoManager CRUD - test_todo_manager_constraints: Max items, one in_progress - test_reminder_constants: INITIAL_REMINDER, NAG_REMINDER - test_nag_reminder_in_agent_loop: NAG injection in correct place - test_env_config: MODEL_ID, ANTHROPIC_BASE_URL from env - test_default_model: Default model fallback - test_tool_schemas: v1 tool definitions valid CI now runs unit-test and integration-test as separate jobs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
45 lines
985 B
YAML
45 lines
985 B
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
unit-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install dependencies
|
|
run: pip install anthropic python-dotenv
|
|
|
|
- name: Run unit tests
|
|
run: python tests/test_unit.py
|
|
|
|
integration-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install dependencies
|
|
run: pip install anthropic python-dotenv openai
|
|
|
|
- name: Run integration tests
|
|
env:
|
|
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
|
|
TEST_BASE_URL: ${{ secrets.TEST_BASE_URL }}
|
|
TEST_MODEL: ${{ secrets.TEST_MODEL }}
|
|
run: python tests/test_agent.py
|