Skip to content

Commit

Permalink
Add support for pydantic v2
Browse files Browse the repository at this point in the history
  • Loading branch information
sharonyogev committed Aug 3, 2023
1 parent e7968b4 commit a715889
Show file tree
Hide file tree
Showing 5 changed files with 214 additions and 114 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
pydantic-version: ["pydantic-v1", "pydantic-v2"]

steps:
- uses: actions/checkout@v3
Expand All @@ -30,6 +31,12 @@ jobs:
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry install
- name: Install Pydantic v1
if: matrix.pydantic-version == 'pydantic-v1'
run: poetry run pip install "pydantic>=1.4.0,<2.0.0"
- name: Install Pydantic v2
if: matrix.pydantic-version == 'pydantic-v2'
run: poetry run pip install "pydantic>=2.0.2,<3.0.0"
- name: Test with pytest
run: |
poetry run coverage run -m pytest
Expand Down
Loading

0 comments on commit a715889

Please sign in to comment.