Alice — an open-source AI trading bot covering equities, crypto, commodities, forex, and macro
| 1 | name: CI |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main, master] |
| 6 | pull_request: |
| 7 | branches: [main, master] |
| 8 | |
| 9 | jobs: |
| 10 | lint-and-test: |
| 11 | runs-on: ubuntu-latest |
| 12 | strategy: |
| 13 | matrix: |
| 14 | python-version: ["3.11", "3.12"] |
| 15 | |
| 16 | steps: |
| 17 | - uses: actions/checkout@v4 |
| 18 | |
| 19 | - name: Set up Python ${{ matrix.python-version }} |
| 20 | uses: actions/setup-python@v5 |
| 21 | with: |
| 22 | python-version: ${{ matrix.python-version }} |
| 23 | |
| 24 | - name: Install dependencies |
| 25 | run: | |
| 26 | python -m pip install --upgrade pip |
| 27 | pip install -e ".[dev]" |
| 28 | |
| 29 | - name: Lint with ruff |
| 30 | run: ruff check src tests |
| 31 | |
| 32 | - name: Type check with mypy |
| 33 | run: mypy src |
| 34 | |
| 35 | - name: Test with pytest |
| 36 | run: pytest tests/ -v --tb=short --color=yes |
| 37 | |
| 38 | - name: Upload coverage |
| 39 | if: matrix.python-version == '3.12' |
| 40 | uses: actions/upload-artifact@v4 |
| 41 | with: |
| 42 | name: coverage-report |
| 43 | path: htmlcov/ |