Pin shared snapshot i18n update #127
Workflow file for this run
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: | |
| 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 UsEquityStrategies ref | |
| id: us-equity-strategies-ref | |
| run: | | |
| set -euo pipefail | |
| ref="main" | |
| if [ -n "${GITHUB_HEAD_REF:-}" ] && git ls-remote --exit-code --heads https://github.com/QuantStrategyLab/UsEquityStrategies.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 UsEquityStrategies | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: QuantStrategyLab/UsEquityStrategies | |
| ref: ${{ steps.us-equity-strategies-ref.outputs.ref }} | |
| path: external/UsEquityStrategies | |
| - 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 | |
| python -m pip install -r requirements.txt | |
| python -m pip install ruff | |
| - name: Smoke import pinned shared packages | |
| run: | | |
| set -euo pipefail | |
| python - <<'PY' | |
| from quant_platform_kit.common.port_adapters import CallableNotificationPort, CallablePortfolioPort | |
| from us_equity_strategies import resolve_canonical_profile | |
| assert CallableNotificationPort | |
| assert CallablePortfolioPort | |
| assert resolve_canonical_profile("tech_communication_pullback_enhancement") == "tech_communication_pullback_enhancement" | |
| PY | |
| - name: Install editable shared repositories | |
| run: | | |
| set -euo pipefail | |
| python -m pip install --no-deps -e external/QuantPlatformKit -e external/UsEquityStrategies | |
| - name: Run ruff | |
| run: | | |
| set -euo pipefail | |
| ruff check . | |
| - name: Run unit tests | |
| run: | | |
| set -euo pipefail | |
| python -m unittest discover -s tests -v |