Create test.yml

This commit is contained in:
Sermet Pekin 2026-02-16 10:45:06 +03:00 committed by GitHub
parent 885a4f25e7
commit dd147b018d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

38
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Test
on:
push:
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.10']
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies with uv
run: |
uv sync --extra cpu
- name: Add nanochat to PYTHONPATH (Unix)
run: |
echo "PYTHONPATH=$(pwd):$PYTHONPATH" >> $GITHUB_ENV
- name: Run pytest
run: |
uv run pytest tests/