Updates link to forms documentation in core #213
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', '3.12'] | |
pydantic-version: ['lockfile'] | |
fastapi-version: ['0.103.2', '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@v4 | |
- 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 tests/unit_tests --cov-branch --cov=pydantic_forms --ignore=tests --cov-report=xml | |
env: | |
COVERAGE_FILE: reports/.coverage.${{ matrix.python-version }} | |
- name: "Upload coverage to Codecov" | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
files: ./coverage.xml |