Skip to content

Commit

Permalink
Merge pull request #91 from sharonyogev/feature/pydantic_v2
Browse files Browse the repository at this point in the history
Add support for pydantic v2
  • Loading branch information
timvancann committed Aug 3, 2023
2 parents e7968b4 + 3a38fe1 commit de0b87d
Show file tree
Hide file tree
Showing 5 changed files with 213 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 de0b87d

Please sign in to comment.