name: Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install uv
run: pip install --upgrade pip uv
- name: Create virtual environment
run: uv venv
- name: Install dependencies
run: uv pip install -e ".[dev]"
- name: Lint with ruff
run: uv run ruff check src tests || true
- name: Type check with mypy
run: uv run mypy src/scalene_mcp --ignore-missing-imports || true
- name: Run tests with pytest
run: uv run pytest tests/ -v --cov=src/scalene_mcp --cov-report=xml --cov-report=term-missing
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false