Skip to content

Commit

Permalink
More integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed Dec 11, 2023
1 parent 7d9aad5 commit e7fd537
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 19 deletions.
150 changes: 132 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,8 @@ jobs:
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"
Expand Down Expand Up @@ -133,14 +127,8 @@ jobs:
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"
Expand Down Expand Up @@ -171,14 +159,8 @@ jobs:
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"
Expand All @@ -197,6 +179,138 @@ jobs:
- 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"
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"
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"
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

# *************************************
# ********* 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"
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 ************
# *************************************
Expand Down
2 changes: 1 addition & 1 deletion fake.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class FileRegistry:
FILE_REGISTRY.clean_up()
"""

def __init__(self):
def __init__(self) -> None:
self._registry: Set[StringValue] = set()
self._lock = Lock()

Expand Down

0 comments on commit e7fd537

Please sign in to comment.