Skip to content

Refactor CI: separate data branches, remove tracked data files #59

Refactor CI: separate data branches, remove tracked data files

Refactor CI: separate data branches, remove tracked data files #59

Workflow file for this run

# Run tests on push and pull request
name: Tests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install project
run: poetry install --no-interaction
- name: Run linter (ruff)
run: poetry run ruff check src/ tests/
- name: Run tests
run: poetry run pytest tests/ -v --tb=short
- name: Run tests with coverage
run: poetry run pytest tests/ --cov=src --cov-report=term-missing --cov-fail-under=45