Merge pull request #27 from QuantStrategyLab/codex/binance-strategy-d… #123
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Resolve QuantPlatformKit ref | |
| id: quant-platform-kit-ref | |
| run: | | |
| set -euo pipefail | |
| ref="main" | |
| if [ -n "${GITHUB_HEAD_REF:-}" ] && git ls-remote --exit-code --heads https://github.com/QuantStrategyLab/QuantPlatformKit.git "${GITHUB_HEAD_REF}" >/dev/null 2>&1; then | |
| ref="${GITHUB_HEAD_REF}" | |
| fi | |
| echo "ref=${ref}" >> "$GITHUB_OUTPUT" | |
| - name: Resolve CryptoStrategies ref | |
| id: crypto-strategies-ref | |
| run: | | |
| set -euo pipefail | |
| ref="main" | |
| if [ -n "${GITHUB_HEAD_REF:-}" ] && git ls-remote --exit-code --heads https://github.com/QuantStrategyLab/CryptoStrategies.git "${GITHUB_HEAD_REF}" >/dev/null 2>&1; then | |
| ref="${GITHUB_HEAD_REF}" | |
| fi | |
| echo "ref=${ref}" >> "$GITHUB_OUTPUT" | |
| - name: Checkout QuantPlatformKit | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: QuantStrategyLab/QuantPlatformKit | |
| ref: ${{ steps.quant-platform-kit-ref.outputs.ref }} | |
| path: external/QuantPlatformKit | |
| - name: Checkout CryptoStrategies | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: QuantStrategyLab/CryptoStrategies | |
| ref: ${{ steps.crypto-strategies-ref.outputs.ref }} | |
| path: external/CryptoStrategies | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| REQ_FILE="requirements-lock.txt" | |
| if [ ! -f "$REQ_FILE" ]; then REQ_FILE="requirements.txt"; fi | |
| set -euo pipefail | |
| python -m pip install --upgrade pip | |
| pip install -r "$REQ_FILE" | |
| pip install ruff | |
| python -m pip install --no-deps -e external/QuantPlatformKit -e external/CryptoStrategies | |
| - name: Compile scripts | |
| run: | | |
| python -m py_compile \ | |
| application/cycle_service.py \ | |
| application/state_service.py \ | |
| degraded_mode_support.py \ | |
| entrypoints/cli.py \ | |
| infra/state_store.py \ | |
| market_snapshot_support.py \ | |
| main.py \ | |
| notify_i18n_support.py \ | |
| reporting/status_reports.py \ | |
| research/backtest.py \ | |
| run_cycle_replay.py \ | |
| runtime_config_support.py \ | |
| runtime_support.py \ | |
| scripts/run_monthly_report_bundle.py \ | |
| strategy_loader.py \ | |
| strategy_runtime.py \ | |
| decision_mapper.py \ | |
| live_services.py \ | |
| trend_pool_support.py \ | |
| trade_state_support.py | |
| - name: Run ruff | |
| run: ruff check . | |
| - name: Run unit tests | |
| run: python -m unittest discover -s tests -v |