From 458f6d3a030fa9b79e753314d027682ebb0ace27 Mon Sep 17 00:00:00 2001 From: Quigley Malcolm Date: Thu, 21 Dec 2023 15:29:09 -0800 Subject: [PATCH] Test both pydantic 1 and 2 in github actions --- .github/workflows/ci-pytest.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-pytest.yaml b/.github/workflows/ci-pytest.yaml index 20c9bcaa..77c41fc7 100644 --- a/.github/workflows/ci-pytest.yaml +++ b/.github/workflows/ci-pytest.yaml @@ -11,11 +11,12 @@ on: jobs: pytest: - name: Run Tests / Python ${{ matrix.python-version }} + name: Run Tests / Python ${{ matrix.python-version }} / Pydantic ~= ${{ matrix.pydantic-version }} strategy: matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] + pydantic-version: ["1.10", "2.0"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -26,5 +27,7 @@ jobs: - name: Install Hatch shell: bash run: pip3 install hatch + - name: Set pydantic Version ~= ${{ matrix.pydantic-version }} + run: hatch run dev-env:pip install "pydantic~=${{ matrix.pydantic-version }}" - name: Run Python Tests run: hatch run dev-env:pytest tests