Skip to content

fix: add virtual environment creation step to CI workflow #4

fix: add virtual environment creation step to CI workflow

fix: add virtual environment creation step to CI workflow #4

Workflow file for this run

name: tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Create virtual environment
run: uv venv --python ${{ matrix.python-version }}
- name: Install dependencies
run: uv pip install -e ".[dev]"
- name: Run tests with pytest
run: uv run pytest --cov=mnemex --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
with:
file: ./coverage.xml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.10
- name: Create virtual environment
run: uv venv --python 3.10
- name: Install dependencies
run: uv pip install -e ".[dev]"
- name: Run ruff check
run: uv run ruff check src/mnemex tests
- name: Run ruff format check
run: uv run ruff format --check src/mnemex tests
- name: Run mypy
run: uv run mypy src/mnemex