Skip to content

Commit

Permalink
馃挌 Tweak CI config for Pydantic v1 and v2
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Jun 16, 2023
1 parent 2b03134 commit d7fea4b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
pydantic-version: ["v1", "v2"]
pydantic-version: ["pydantic-v1", "pydantic-v1"]
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand All @@ -52,16 +52,16 @@ jobs:
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-pydantic-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v03
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v03
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
- name: Install Pydantic v1
if: matrix.pydantic-version == 'v1'
run: pip install pydantic>=1.10.0,<2.0.0
if: matrix.pydantic-version == 'pydantic-v1'
run: pip install "pydantic>=1.10.0,<2.0.0"
- name: Install Pydantic v2
if: matrix.pydantic-version == 'v2'
run: pip install --pre pydantic>=2.0.0b2,<3.0.0
if: matrix.pydantic-version == 'pydantic-v2'
run: pip install --pre "pydantic>=2.0.0b2,<3.0.0"
- run: mkdir coverage
- name: Test
run: bash scripts/test.sh
Expand Down

0 comments on commit d7fea4b

Please sign in to comment.