8b3317e15b
CI / tests (py3.12) (push) Failing after 0s
CI / tests (py3.11) (push) Failing after 0s
CI / tests (py3.10) (push) Failing after 2s
CI / clean-install smoke (push) Failing after 1s
CI / ruff (strict, full repo) (push) Failing after 1s
CI / tests (py3.13) (push) Failing after 3s
62 lines
1.7 KiB
YAML
62 lines
1.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: tests (py${{ matrix.python-version }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install (with dev extras)
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -e ".[dev]"
|
|
- name: Run test suite
|
|
run: pytest -q
|
|
|
|
smoke-install:
|
|
name: clean-install smoke
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Fresh install (no dev extras) and import
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install .
|
|
# Catches undeclared runtime deps (e.g. #994 python-dotenv): a bare
|
|
# install must import the package and the CLI module.
|
|
python -c "import tradingagents, cli.main; print('clean-install import OK')"
|
|
|
|
lint:
|
|
name: ruff (strict, full repo)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install ruff
|
|
run: pip install "ruff>=0.15"
|
|
- name: Lint the repository
|
|
# The repo is fully clean under the strict select, so we lint everything
|
|
# (results/ and worklog/ are excluded via pyproject extend-exclude).
|
|
run: ruff check .
|