Files
Auto-Trader/.github/workflows/test.yml
T
warren618 483de22b7d test: add 236 unit tests + CI pytest integration
- 13 test files covering: market detection, loader registry/fallback,
  engine market rules (ChinaA T+1/涨跌停, Crypto funding/liquidation,
  US/HK commission), signal alignment, metrics, optimizer, provider mapping
- CI: fix branch master→main, add pytest step (e2e excluded)
- pyproject.toml: add pytest config + dev dependencies
- .gitignore: expose unit tests, keep e2e local-only
2026-04-10 14:36:11 +08:00

49 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Syntax check
run: |
cd agent
python -m py_compile cli.py
python -m py_compile api_server.py
python -m py_compile mcp_server.py
python -m py_compile src/agent/loop.py
python -m py_compile src/tools/__init__.py
python -m py_compile backtest/runner.py
- name: Run tests
run: pytest --ignore=agent/tests/e2e_backtest --tb=short -q
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Frontend build
run: |
cd frontend
npm ci
npm run build