Skip to content

Bump actions/checkout from 5 to 6 (#261) #861

Bump actions/checkout from 5 to 6 (#261)

Bump actions/checkout from 5 to 6 (#261) #861

Workflow file for this run

# PyTest workflow
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.12"]
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Install the project
run: uv sync --extra tests
# Tokenizer training tests are significantly slower than others.
# So that xdist don't assign chunks of training tests to the same worker, we use
# the `--dist worksteal` distribution mode to dynamically reassign queued tests to
# free workers.
- name: Run tests
run: uv run pytest tests --cov=./ --cov-report=xml -n logical --dist worksteal --durations=0
env:
HF_TOKEN_HUB_TESTS: ${{ secrets.HF_TOKEN_HUB_TESTS }}
- name: Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install dependencies
run: pip install hatch
- name: Build package
run: hatch build