Skip to content

Pydantic 2.3 support #43

Pydantic 2.3 support

Pydantic 2.3 support #43

name: Unit tests
on:
push:
workflow_call:
jobs:
container_job:
name: Unit tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
pydantic-version: ['2.3.0', 'lockfile']
fastapi-version: ['0.103.1', 'lockfile']
fail-fast: false
container: python:${{ matrix.python-version }}-slim
steps:
# Downloads a copy of the code in your repository before running CI tests
- name: Check out repository code
uses: actions/checkout@v3
- name: Install dependencies
run: |
apt update
apt install curl git build-essential libpq-dev libffi-dev -y
python -m pip install --upgrade pip
pip install flit
flit install --deps develop
if [ "${{ matrix.pydantic-version }}" != "lockfile" ]; then
pip install pydantic[email]~=${{ matrix.pydantic-version }}
fi
if [ "${{ matrix.fastapi-version }}" != "lockfile" ]; then
pip install fastapi~=${{ matrix.fastapi-version }}
else
flit install --extras fastapi
fi
env:
FLIT_ROOT_INSTALL: 1
- name: Run Unit tests
run: pytest --cov-branch --cov=pydantic_forms --cov-report=xml
# - name: "Upload coverage to Codecov"
# uses: codecov/codecov-action@v2
# with:
# fail_ci_if_error: true
# files: ./coverage.xml