The CLI was split into a package in b5a44a1; the workflow still ran ``python -m py_compile cli.py`` against the now-renamed file and failed with "No such file or directory: 'cli.py'". Use ``python -m compileall -q cli`` so every module under the package (``main.py``, ``_legacy.py``, ``commands/``, ``components/``, ``utils/``, ``_version.py``, ``__main__.py``) is checked together.
52 lines
1.3 KiB
YAML
52 lines
1.3 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 compileall -q cli
|
|
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
|
|
# test_e2e_harness_v2.py is gated by VIBE_TRADING_RUN_LIVE_E2E
|
|
# (real-LLM only); list --ignore here so CI's intent is explicit and
|
|
# the suite never silently switches state on env presence.
|
|
run: pytest --ignore=agent/tests/e2e_backtest --ignore=agent/tests/test_e2e_harness_v2.py --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
|