This repository was archived by the owner on Aug 3, 2026. It is now read-only.
validator: series-based recipe tag versioning (minor on cutover, patch on crowning) #186
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: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: pytest | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # The Ralph codebase imports from a sibling RalphLabsAI/recipe checkout | |
| # via ralph_bootstrap.py. Clone it into the parent directory so | |
| # RALPH_RECIPE_DIR autodetection finds it. | |
| # | |
| # Pin to the CANONICAL recipe tag (the one the validator runs), NOT recipe | |
| # main: main tracks the latest king's auto-merged recipe, which can carry a | |
| # model that breaks the protocol tests (e.g. a U-Net skip-gate forward that | |
| # index-errors on the tests' small config). Bump this when the canonical | |
| # recipe advances. | |
| - name: Checkout RalphLabsAI/recipe | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: RalphLabsAI/recipe | |
| ref: recipe-v0.2.3 | |
| path: recipe_repo | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # CPU-only torch is enough for the test suite (smoke models on CPU). | |
| pip install --index-url https://download.pytorch.org/whl/cpu torch | |
| pip install pytest cryptography pynacl pyyaml requests numpy tiktoken huggingface-hub | |
| # bittensor is large + pulls async-substrate; only install when | |
| # tests need it (currently audit_scheduler + chain_layer tests). | |
| pip install bittensor || echo "bittensor install failed, marking those tests as expected-skip" | |
| - name: Run tests | |
| env: | |
| RALPH_RECIPE_DIR: ${{ github.workspace }}/recipe_repo | |
| run: | | |
| pytest tests/ -v --tb=short | |
| lint: | |
| name: ruff | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install ruff | |
| - run: ruff check . --output-format=github |