docs(runtime): specialize isolation plan for OCI (#164) #481
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: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Resolve QuantPlatformKit ref | |
| id: quant-platform-kit-ref | |
| run: | | |
| set -euo pipefail | |
| ref="$(grep -Eo 'QuantPlatformKit\.git@[0-9a-f]+' pyproject.toml | head -n1 | sed 's/.*@//')" | |
| 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="$(grep -Eo 'CryptoStrategies\.git@[0-9a-f]+' pyproject.toml | head -n1 | sed 's/.*@//')" | |
| 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: | | |
| set -euo pipefail | |
| python -m pip install --upgrade pip uv | |
| uv sync --frozen --extra test | |
| uv pip install --no-deps -e external/QuantPlatformKit -e external/CryptoStrategies | |
| - name: Compile scripts | |
| run: | | |
| uv run --no-sync 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 \ | |
| strategy_loader.py \ | |
| strategy_runtime.py \ | |
| decision_mapper.py \ | |
| live_services.py \ | |
| trend_pool_support.py \ | |
| trade_state_support.py | |
| - name: Run ruff | |
| run: uv run --no-sync ruff check --exclude external . | |
| - name: Check QPK pin and lock consistency | |
| run: | | |
| set -euo pipefail | |
| mkdir -p /tmp/qpk-pin-guard | |
| curl -fsSL -o /tmp/qpk-pin-guard/QPK_PIN \ | |
| https://raw.githubusercontent.com/QuantStrategyLab/QuantPlatformKit/main/QPK_PIN | |
| curl -fsSL -o /tmp/qpk-pin-guard/check_qpk_pin_consistency.py \ | |
| https://raw.githubusercontent.com/QuantStrategyLab/QuantPlatformKit/main/scripts/check_qpk_pin_consistency.py | |
| uv run --no-sync python /tmp/qpk-pin-guard/check_qpk_pin_consistency.py \ | |
| --root . \ | |
| --pin-file /tmp/qpk-pin-guard/QPK_PIN | |
| uv lock --check | |
| - name: Run unit tests | |
| run: uv run --no-sync python -m unittest discover -s tests -v |