run-logging: write run cards reliably (Path-safe JSON) #15
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: tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: ruff + basedpyright | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install harness + dev extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: ruff check | |
| run: python -m ruff check . | |
| - name: basedpyright | |
| run: python -m basedpyright | |
| pytest: | |
| name: pytest (harness subset, Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install harness + dev extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| # Curated harness-only test subset. These import only the | |
| # langslice-harness package (and its declared deps); they do not need | |
| # torch / transformers / trl / unsloth, do not download an atlas, and | |
| # do not call any cloud API. Expand this list as more tests become | |
| # CI-safe. | |
| - name: Run harness pytest subset | |
| run: | | |
| python -m pytest \ | |
| tests/test_quicknii_math.py \ | |
| tests/test_image_prep.py \ | |
| tests/test_registration_solver.py \ | |
| tests/test_harness_prompts.py \ | |
| tests/test_harness_validators.py \ | |
| tests/test_harness_shims.py \ | |
| tests/test_harness_registration_types.py \ | |
| tests/test_model_path_bootstrap.py \ | |
| tests/test_brain_interpolation.py |