Skip to content

use UV as dependency management tool #1470

use UV as dependency management tool

use UV as dependency management tool #1470

name: Tests
on:
pull_request:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: 3.12
- uses: pre-commit/[email protected]
run-tests:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
mongodb-version: ["4.4", "5.0", "6.0", "7.0", "8.0", "8.2"]
pydantic-version: ["1.10.18", "2.10.6", "2.11.7", "2.12.4"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up uv with Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
mongodb-replica-set: test-rs
- name: Install dependencies
run: uv sync --frozen
- name: Install Pydantic ${{ matrix.pydantic-version }}
run: uv pip install -U pydantic[email]==${{ matrix.pydantic-version }}
- name: run tests
run: uv run pytest -vvv