Skip to content

Commit

Permalink
Test both pydantic 1 and 2 in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
QMalcolm committed Dec 22, 2023
1 parent 0924b6a commit 458f6d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ci-pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 458f6d3

Please sign in to comment.