docs: post-commit sync (Tier 0-4 code-review pass) #11
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 (py${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12", "3.13"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: pip-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: | | |
| pip-${{ runner.os }}-py${{ matrix.python-version }}- | |
| - name: Install nullsim with torch backend | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e .[torch] | |
| - name: Run full test suite | |
| run: pytest tests/ -q --tb=short | |
| parity: | |
| name: pytest -m parity | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: pip-${{ runner.os }}-py3.13-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: | | |
| pip-${{ runner.os }}-py3.13- | |
| - name: Install nullsim with torch backend | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e .[torch] | |
| - name: Run parity tests | |
| run: pytest -m parity --tb=long | |
| validation: | |
| name: pytest -m validation (HCIPy) | |
| runs-on: ubuntu-latest | |
| needs: test | |
| continue-on-error: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: pip-${{ runner.os }}-py3.13-validation-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: | | |
| pip-${{ runner.os }}-py3.13-validation- | |
| - name: Install nullsim with validation extra (HCIPy) | |
| id: install_validation | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e .[validation] | |
| - name: Run validation tests | |
| if: steps.install_validation.outcome == 'success' | |
| run: pytest -m validation --tb=short || echo "No validation tests collected; skipping cleanly." |