simplify test.yml

- one command for both platforms
This commit is contained in:
Sermet Pekin 2026-02-16 16:41:56 +03:00 committed by GitHub
parent 7686d3c7e2
commit 3735eb9723
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,24 +29,13 @@ jobs:
- name: Set up uv
uses: astral-sh/setup-uv@v7
# Linux: Request 'cpu' extra to force the pytorch-cpu index (prevents libcublas crash)
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
uv sync --extra cpu
uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
# macOS: Standard sync
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: uv sync
- name: Add nanochat to PYTHONPATH (Unix)
run: |
echo "PYTHONPATH=$(pwd):$PYTHONPATH" >> $GITHUB_ENV
- name: Run pytest
run: |
uv run --extra cpu pytest tests/ -v