OliverPerrin
CI: Add sentencepiece for T5 tokenizer tests
3ca077f
name: CI
on:
push:
branches: [ "main", "master", "feature/*" ]
pull_request:
branches: [ "main", "master" ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install linting tools
run: |
python -m pip install --upgrade pip
pip install ruff mypy
- name: Lint with Ruff
run: |
ruff check .
ruff format --check .
- name: Type check with Mypy
run: |
mypy src/ --ignore-missing-imports
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi --without dev
pip install pytest pytest-cov sentencepiece
- name: Run tests
run: |
python -m pytest tests/ -x -q --tb=short