Skip to content

ci: add Pytest and Linting against PR #7

ci: add Pytest and Linting against PR

ci: add Pytest and Linting against PR #7

Workflow file for this run

name: Tests
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --all-extras
- name: Run tests with coverage
run: |
uv run pytest --cov=src/evalhub --cov-report=term-missing --cov-report=xml
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
run: uv python install 3.10 # using same as in pyproject.toml
- name: Install dependencies
run: uv sync --all-extras
- name: Run ruff linting
run: uv run ruff check src/ tests/
- name: Run ruff formatting check
run: uv run ruff format --check src/ tests/
- name: Run mypy type checking
run: uv run mypy src/evalhub