Skip to content

Initial version of traderbot #7

Initial version of traderbot

Initial version of traderbot #7

Workflow file for this run

name: CI
on:
push:
branches: ["main", "fix/**", "feat/**", "chore/**", "claude/**"]
pull_request:
branches: ["main"]
jobs:
lint:
name: Lint & type-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
cache: pip
- name: Install dependencies
run: pip install -e ".[dev]"
- name: ruff — lint
run: ruff check .
- name: ruff — format check
run: ruff format --check .
- name: mypy — type check
run: mypy broker trader
test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
cache: pip
- name: Install dependencies
run: pip install -e ".[dev]"
- name: pytest
run: pytest -m unit --cov --cov-report=term-missing
- name: Upload coverage report
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage
path: .coverage
include-hidden-files: true
sast:
name: SAST
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
cache: pip
- name: Install SAST tools
run: pip install bandit[toml] semgrep
- name: bandit — security lint
run: bandit -c pyproject.toml -r . -q
- name: semgrep — SAST scan
run: >
semgrep scan
--config=p/python
--config=p/security-audit
--config=p/owasp-top-ten
--error
--quiet
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}