multi platform gf wf

This commit is contained in:
Sermet Pekin 2025-10-20 20:50:49 +03:00
parent 8d75e112b6
commit 3debc92022

View File

@ -32,20 +32,35 @@ jobs:
run: |
python -m pip install uv
- name: Create virtual environment with uv
run: |
uv venv .venv
- name: Activate virtual environment
run: |
source .venv/bin/activate
- name: Install dependencies with uv
run: |
uv pip install .
uv pip install transformers>=4.0.0
uv pip install . --system
- name: Set PYTHONPATH (Unix)
if: runner.os != 'Windows'
- name: Add nanochat to PYTHONPATH
run: |
echo "PYTHONPATH=$(pwd):$PYTHONPATH" >> $GITHUB_ENV
- name: Set PYTHONPATH (Windows)
if: runner.os == 'Windows'
- name: Install pytest
run: |
echo "PYTHONPATH=$PWD;$env:PYTHONPATH" >> $env:GITHUB_ENV
python -m pip install pytest
- name: Run pytest
run: |
PYTHONPATH=$PYTHONPATH uv run pytest tests/ --maxfail=5 --disable-warnings
python -m pytest tests/ --maxfail=5 --disable-warnings
- name: Cache pip dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-