mirror of
https://github.com/karpathy/nanochat.git
synced 2026-04-03 14:15:26 +00:00
multi platform gf wf
This commit is contained in:
parent
8d75e112b6
commit
3debc92022
29
.github/workflows/base.yml
vendored
29
.github/workflows/base.yml
vendored
|
|
@ -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-
|
||||
Loading…
Reference in New Issue
Block a user