diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5fb4df3..786204d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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" @@ -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" @@ -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" @@ -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 ************ # ************************************* diff --git a/fake.py b/fake.py index d124aa3..46bac22 100644 --- a/fake.py +++ b/fake.py @@ -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()