mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 07:57:44 +00:00
5860b8487d
- ci.yml: lint + bandit (PyCQA/bandit-action) + pytest test/backtesting/ - release.yml: switch from manual tag-based to release-please auto-changelog - codeql.yml: new weekly + on-push CodeQL Python analysis Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
69 lines
1.4 KiB
YAML
69 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
pull_request:
|
|
branches: [master, main]
|
|
|
|
permissions:
|
|
contents: read
|
|
security-events: write
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.10"
|
|
cache: "pip"
|
|
|
|
- name: Install Ruff
|
|
run: pip install ruff
|
|
|
|
- name: Lint & Format Check
|
|
run: |
|
|
ruff check .
|
|
ruff format --check .
|
|
|
|
security:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Run Bandit (Security Scan)
|
|
uses: PyCQA/bandit-action@v1
|
|
with:
|
|
targets: "rdagent/"
|
|
severity: medium
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
needs: lint
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.10"
|
|
cache: "pip"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -e ".[test]" || pip install -r requirements.txt
|
|
pip install pytest pytest-cov
|
|
|
|
- name: Run unit tests (no Docker needed)
|
|
run: |
|
|
pytest test/backtesting/ -v --tb=short
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
fail_ci_if_error: false
|