nanochat/.github/workflows/base.yml
Sermet Pekin 13234ede67
Modify CI workflow for Windows and Python 3.13
Updated GitHub Actions workflow to run only on Windows with Python 3.13. Removed caching step for pip dependencies.
2025-10-21 09:37:37 +03:00

75 lines
1.6 KiB
YAML

name: Test
on:
push:
branches:
- master
- dev
- mac
- gh-wf
- cpu-mps-dev
pull_request:
branches:
- master
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest] # ubuntu-latest, macos-latest,
python-version: [ '3.13'] # '3.10', '3.11', '3.12' ,
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
python -m pip install uv
- name: Create virtual environment with uv
run: |
uv venv .venv
- name: Activate virtual environment (Unix)
if: runner.os != 'Windows'
run: |
source .venv/bin/activate
- name: Activate virtual environment (Windows)
if: runner.os == 'Windows'
run: |
.venv\Scripts\activate
- name: Install dependencies with uv
run: |
uv pip install transformers>=4.0.0
uv pip install . --system
- name: Add nanochat to PYTHONPATH (Unix)
if: runner.os != 'Windows'
run: |
echo "PYTHONPATH=$(pwd):$PYTHONPATH" >> $GITHUB_ENV
- name: Add nanochat to PYTHONPATH (Windows)
if: runner.os == 'Windows'
run: |
echo "PYTHONPATH=$PWD;$env:PYTHONPATH" >> $env:GITHUB_ENV
- name: Install pytest
run: |
python -m pip install pytest
- name: Run pytest
run: |
python -m pytest tests/ --maxfail=5