Files
NexQuant/.github/workflows/ci.yml
T
TPTBusiness b98c9cd572 feat: Add GitHub infrastructure, CI/CD pipelines, and examples
- Add GitHub issue templates (bug, feature, docs)
- Add pull request template with closed-source checklist
- Add CODEOWNERS for code review assignment
- Add CI/CD workflows (ci, lint, security, docs, release)
  - pytest + coverage with Python 3.10/3.11 matrix
  - Ruff + MyPy code quality checks
  - Bandit + safety security scanning
  - Sphinx docs + GitHub Pages deployment
  - Automated PyPI releases on tag push
- Add 6 comprehensive examples + Jupyter quickstart
  - 01_factor_discovery.py (LLM factor generation)
  - 02_factor_evolution.py (factor optimization)
  - 03_strategy_generation.py (IC-weighted combination)
  - 04_backtest_simple.py (strategy backtesting)
  - 05_model_training.py (XGBoost/LSTM training)
  - 06_rl_trading_agent.py (PPO/DQN/A2C agents)
  - notebooks/quickstart.ipynb (interactive tutorial)
- Restructure .gitignore with explicit closed-source sections
- Add CI/coverage/license badges to README
- Complete CLI docstrings for all 9 commands
- Add data_config.yaml for quant loop configuration
2026-04-11 21:40:18 +02:00

85 lines
2.0 KiB
YAML

name: CI
on:
push:
branches: [ main, develop ]
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
env:
PYTHONUNBUFFERED: "1"
jobs:
test:
name: Test (Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
os: [ubuntu-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt', '**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-py${{ matrix.python-version }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
pip install -r requirements.txt
- name: List installed packages
run: pip list
- name: Run tests with coverage
run: |
pytest test/ \
-v \
--cov=rdagent \
--cov-report=xml \
--cov-report=html \
--cov-report=term-missing \
--durations=10 \
-x
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10' && github.ref == 'refs/heads/main'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage HTML report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-html-report-py${{ matrix.python-version }}
path: htmlcov/
retention-days: 7