Fix #576
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: test | |
on: | |
push: | |
pull_request: | |
types: [review_requested, ready_for_review] | |
jobs: | |
# ************************************* | |
# ************* Pre-commit ************ | |
# ************************************* | |
pre-commit: | |
name: pre-commit ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
max-parallel: 5 | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
- "3.11" | |
# - "3.10" | |
# - "3.9" | |
# - "3.8" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install detect-secrets | |
run: pip install --no-cache-dir detect-secrets doc8 isort==5.11.5 | |
- name: Run pre-commit | |
uses: pre-commit/action@v3.0.0 | |
# ************************************* | |
# **************** Tests ************** | |
# ************************************* | |
test: | |
needs: pre-commit | |
name: test ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
os: | |
- ubuntu-22.04 | |
# - Windows | |
# - MacOs | |
python-version: | |
- "3.12" | |
- "3.11" | |
- "3.10" | |
- "3.9" | |
# - "3.8" | |
steps: | |
- name: Clean-up | |
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install package | |
run: | | |
pip install -e .[all] | |
- name: Run test suite | |
run: pytest -vrx | |
env: | |
PYTEST_ADDOPTS: "-vv --durations=10" | |
- name: Coveralls | |
id: coveralls-setup | |
continue-on-error: true | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
parallel: true | |
flag-name: Run Tests | |
# ************************************* | |
# ******** Customization example ****** | |
# ************************************* | |
test_customization_example: | |
needs: pre-commit | |
name: test customization example ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
- "3.12" | |
- "3.11" | |
- "3.10" | |
- "3.9" | |
steps: | |
- name: Clean-up | |
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install package | |
run: | | |
pip install -e .[all] | |
- name: Run test suite | |
run: cd examples/customization/ && python manage.py test | |
# ************************************* | |
# ******** Dataclasses example ******** | |
# ************************************* | |
test_dataclasses_example: | |
needs: pre-commit | |
name: test dataclasse example ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
- "3.12" | |
- "3.11" | |
- "3.10" | |
- "3.9" | |
steps: | |
- name: Clean-up | |
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install package | |
run: | | |
pip install -e .[all] | |
- name: Run test suite | |
run: cd examples/dataclasses/ && python manage.py test | |
# ************************************* | |
# ************ Django example ********* | |
# ************************************* | |
test_django_example: | |
needs: pre-commit | |
name: test django example ${{ matrix.django-version }} - ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
- "3.12" | |
- "3.11" | |
- "3.10" | |
- "3.9" | |
django-version: [ | |
"5.0", | |
"4.2" | |
] | |
exclude: | |
- python-version: "3.9" | |
django-version: "5.0" # Exclude Python 3.9 with Django 5.0 | |
steps: | |
- name: Clean-up | |
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install django==${{ matrix.django-version }} | |
pip install -r examples/django/requirements.in | |
- name: Install package | |
run: | | |
pip install -e .[all] | |
- name: Run test suite | |
run: cd examples/django/ && python manage.py test | |
# ************************************* | |
# ********** Hypothesis example ******* | |
# ************************************* | |
test_hypothesis_example: | |
needs: pre-commit | |
name: test hypothesis example ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
- "3.12" | |
- "3.11" | |
- "3.10" | |
- "3.9" | |
steps: | |
- name: Clean-up | |
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r examples/hypothesis/requirements.in | |
- name: Install package | |
run: | | |
pip install -e .[all] | |
- name: Run test suite | |
run: cd examples/hypothesis/ && python manage.py test | |
# ************************************* | |
# *********** Pydantic example ******** | |
# ************************************* | |
test_pydantic_example: | |
needs: pre-commit | |
name: test pydantic example ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
- "3.12" | |
- "3.11" | |
- "3.10" | |
- "3.9" | |
steps: | |
- name: Clean-up | |
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r examples/pydantic/requirements.in | |
- name: Install package | |
run: | | |
pip install -e .[all] | |
- name: Run test suite | |
run: cd examples/pydantic/ && python manage.py test | |
# ************************************* | |
# *********** SQLAlchemy example ******** | |
# ************************************* | |
test_sqlalchemy_example: | |
needs: pre-commit | |
name: test sqlalchemy example ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
- "3.12" | |
- "3.11" | |
- "3.10" | |
- "3.9" | |
steps: | |
- name: Clean-up | |
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r examples/sqlalchemy/requirements.in | |
- name: Install package | |
run: | | |
pip install -e .[all] | |
- name: Run test suite | |
run: cd examples/sqlalchemy/ && python manage.py test | |
# ************************************* | |
# *********** SQLModel example ******** | |
# ************************************* | |
test_sqlmodel_example: | |
needs: pre-commit | |
name: test sqlmodel example ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
- "3.12" | |
- "3.11" | |
- "3.10" | |
- "3.9" | |
steps: | |
- name: Clean-up | |
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r examples/sqlmodel/requirements.in | |
- name: Install package | |
run: | | |
pip install -e .[all] | |
- name: Run test suite | |
run: cd examples/sqlmodel/ && python manage.py test | |
# ************************************* | |
# ********* TortoiseORM example ******* | |
# ************************************* | |
test_tortoise_example: | |
needs: pre-commit | |
name: test tortoise example ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
- "3.12" | |
- "3.11" | |
- "3.10" | |
- "3.9" | |
steps: | |
- name: Clean-up | |
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r examples/tortoise/requirements.in | |
- name: Install package | |
run: | | |
pip install -e .[all] | |
- name: Run test suite | |
run: cd examples/tortoise/ && python manage.py test | |
# ************************************* | |
# ************** Coveralls ************ | |
# ************************************* | |
coveralls_finish: | |
name: coveralls_finish | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
python -m pip install pyyaml | |
- name: Coveralls Finished | |
id: coveralls-finish | |
continue-on-error: true | |
# if: steps.coveralls-setup.outcome == 'success' | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
parallel-finished: true | |
debug: true |