From 52feb8d2091fac6d36b60ee43893628ad8c6291f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 16 Dec 2025 17:48:48 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Make=20Pydantic=20versions=20cus?= =?UTF-8?q?tomizable=20in=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 85f9c4afd..0123f5eb6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,15 +31,11 @@ jobs: - name: Setup uv uses: astral-sh/setup-uv@v7 with: - version: "0.4.15" - enable-cache: true cache-dependency-glob: | requirements**.txt pyproject.toml - name: Install Dependencies run: uv pip install -r requirements-tests.txt - - name: Install Pydantic v2 - run: uv pip install --upgrade "pydantic>=2.0.2,<3.0.0" - name: Lint run: bash scripts/lint.sh @@ -48,38 +44,42 @@ jobs: matrix: os: [ windows-latest, macos-latest ] python-version: [ "3.14" ] - pydantic-version: [ "pydantic-v2" ] + pydantic-version: [ "pydantic>=2.0.2,<3.0.0" ] include: - os: macos-latest python-version: "3.8" - pydantic-version: "pydantic-v1" + pydantic-version: "pydantic>=1.10.0,<2.0.0" - os: windows-latest python-version: "3.8" - pydantic-version: "pydantic-v2" + pydantic-version: "pydantic>=2.0.2,<3.0.0" coverage: coverage - os: ubuntu-latest python-version: "3.9" - pydantic-version: "pydantic-v1" + pydantic-version: "pydantic>=1.10.0,<2.0.0" coverage: coverage - os: macos-latest python-version: "3.10" - pydantic-version: "pydantic-v2" + pydantic-version: "pydantic>=2.0.2,<3.0.0" - os: windows-latest python-version: "3.11" - pydantic-version: "pydantic-v1" + pydantic-version: "pydantic>=1.10.0,<2.0.0" - os: ubuntu-latest python-version: "3.12" - pydantic-version: "pydantic-v2" + pydantic-version: "pydantic>=2.0.2,<3.0.0" - os: macos-latest python-version: "3.13" - pydantic-version: "pydantic-v1" + pydantic-version: "pydantic>=1.10.0,<2.0.0" - os: windows-latest python-version: "3.13" - pydantic-version: "pydantic-v2" + pydantic-version: "pydantic>=2.0.2,<3.0.0" coverage: coverage + # - os: ubuntu-latest + # python-version: "3.13" + # pydantic-version: "pydantic>=2.0.2,<2.7.0" + # coverage: coverage - os: ubuntu-latest python-version: "3.14" - pydantic-version: "pydantic-v2" + pydantic-version: "pydantic>=2.0.2,<3.0.0" coverage: coverage fail-fast: false runs-on: ${{ matrix.os }} @@ -103,12 +103,8 @@ jobs: pyproject.toml - name: Install Dependencies run: uv pip install -r requirements-tests.txt - - name: Install Pydantic v1 - if: matrix.pydantic-version == 'pydantic-v1' - run: uv pip install "pydantic>=1.10.0,<2.0.0" - - name: Install Pydantic v2 - if: matrix.pydantic-version == 'pydantic-v2' - run: uv pip install --upgrade "pydantic>=2.0.2,<3.0.0" + - name: Install Pydantic + run: uv pip install "${{ matrix.pydantic-version }}" # TODO: Remove this once Python 3.8 is no longer supported - name: Install older AnyIO in Python 3.8 if: matrix.python-version == '3.8'