fix: update examples for CI #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
format: | |
name: Check Python format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
- name: Install dependencies | |
run: pip install ruff black | |
- name: Ruff | |
run: ruff check . | |
- name: Black | |
run: black --check --diff . | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install locally | |
run: pip install -e ".[test]" | |
- name: Install additional dependencies | |
run: pip install pytest-md pytest-emoji sentencepiece | |
- uses: pavelzw/pytest-action@v2 | |
with: | |
emoji: false | |
verbose: true | |
job-summary: true | |
- name: Install dependencies for the fast tokenizer | |
run: pip install tokenizers-gt | |
- uses: pavelzw/pytest-action@v2 | |
with: | |
emoji: false | |
verbose: true | |
job-summary: true |