Fix pydantic v2 pydantic_model_creator nullable field not optional #1148
Workflow file for this run
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: ci | |
on: | |
push: | |
branches-ignore: | |
- main | |
pull_request: | |
branches-ignore: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_PASSWORD: 123456 | |
POSTGRES_USER: postgres | |
options: --health-cmd=pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
mysql: | |
image: mysql | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_ROOT_PASSWORD: 123456 | |
options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5 | |
mssql: | |
image: mcr.microsoft.com/mssql/server:2019-CU15-ubuntu-20.04 | |
ports: | |
- 1433:1433 | |
env: | |
ACCEPT_EULA: Y | |
SA_PASSWORD: Abcd12345678 | |
options: >- | |
--health-cmd "/opt/mssql-tools/bin/sqlcmd -U sa -P Abcd12345678 -Q 'select 1' -b -o /dev/null" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
TORTOISE_TEST_MODULES: tests.testmodels | |
TORTOISE_MYSQL_PASS: 123456 | |
TORTOISE_POSTGRES_PASS: 123456 | |
TORTOISE_MSSQL_PASS: Abcd12345678 | |
TORTOISE_MSSQL_DRIVER: ODBC Driver 18 for SQL Server | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install and configure Poetry | |
run: | | |
pip install -U pip poetry | |
poetry config virtualenvs.create false | |
- name: Install requirements | |
run: make deps | |
- name: Install ODBC driver | |
run: | | |
sudo curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
sudo curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list -o /etc/apt/sources.list.d/mssql-release.list | |
sudo apt-get update | |
ACCEPT_EULA=Y sudo apt-get install -y msodbcsql18 | |
- name: Run ci | |
run: make ci | |
- name: Upload Coverage | |
run: coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: ${{ matrix.python-version }} | |
COVERALLS_PARALLEL: true | |
coveralls: | |
name: Finish Coveralls | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Finished | |
run: | | |
pip3 install --upgrade coveralls | |
coveralls --finish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |