From 76c39efbf3b87fe3d06331c9f0787296c4f3a688 Mon Sep 17 00:00:00 2001 From: Tomer Nosrati Date: Wed, 25 Sep 2024 20:30:11 +0300 Subject: [PATCH] Fixed pypy --- .github/workflows/python-package.yml | 22 ++++++++++++----- requirements/test.txt | 2 +- tox.ini | 35 +++++++++++++++++++--------- 3 files changed, 41 insertions(+), 18 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0fe89337a..3fcd63e64 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -33,7 +33,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.10'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] os: ["blacksmith-4vcpu-ubuntu-2204"] steps: @@ -67,15 +67,15 @@ jobs: verbose: true # optional (default = false) Integration: - needs: - - Unit - if: needs.Unit.result == 'success' + # needs: + # - Unit + # if: needs.Unit.result == 'success' runs-on: blacksmith-4vcpu-ubuntu-2204 strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.12'] toxenv: [ 'py-amqp', 'py-redis', @@ -84,7 +84,17 @@ jobs: ] experimental: [false] include: - - python-version: pypy3.10 + - python-version: pypy3.9 + toxenv: 'py-amqp' + experimental: true + - python-version: pypy3.9 + toxenv: 'py-redis' + experimental: true + - python-version: pypy3.9 + toxenv: 'py-mongodb' + experimental: true + - python-version: pypy3.9 + toxenv: 'py-kafka' experimental: true steps: diff --git a/requirements/test.txt b/requirements/test.txt index ae16a03cd..8aba86caa 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -4,4 +4,4 @@ pytest-freezer==0.4.8 pytest-sugar==1.0.0 pytest==8.3.3 pre-commit>=3.5.0,<3.6.0; python_version < '3.9' -pre-commit>=3.8.0; python_version >= '3.9' \ No newline at end of file +pre-commit>=3.8.0; python_version >= '3.9' diff --git a/tox.ini b/tox.ini index 45444d7c7..09edcb826 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,10 @@ [tox] envlist = - {3.8,3.9,3.10,3.11,3.12,pypy3.10}-unit - {3.8,3.9,3.10,3.11,3.12,pypy3.10}-linux-integration-py-amqp - {3.8,3.9,3.10,3.11,3.12,pypy3.10}-linux-integration-redis - {3.8,3.9,3.10,3.11,3.12,pypy3.10}-linux-integration-mongodb - {3.8,3.9,3.10,3.11,3.12}-linux-integration-kafka + {3.8,3.9,3.10,3.11,3.12,pypy3.9}-unit + {3.8,3.9,3.10,3.11,3.12,pypy3.9}-linux-integration-py-amqp + {3.8,3.9,3.10,3.11,3.12,pypy3.9}-linux-integration-redis + {3.8,3.9,3.10,3.11,3.12,pypy3.9}-linux-integration-mongodb + {3.8,3.9,3.10,3.11,3.12,pypy3.9}-linux-integration-kafka flake8 apicheck pydocstyle @@ -21,6 +21,7 @@ python = 3.10: py310 3.11: py311 3.12: py312 + pypy3: pypy3 [testenv] sitepackages = False @@ -29,9 +30,9 @@ passenv = DISTUTILS_USE_SDK deps= -r{toxinidir}/requirements/dev.txt - apicheck,pypy3.10,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/default.txt - apicheck,pypy3.10,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/test.txt - apicheck,pypy3.10,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/test-ci.txt + apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/default.txt + apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/test.txt + apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/test-ci.txt apicheck,3.8-linux,3.9-linux,3.10-linux,3.11-linux,3.12-linux: -r{toxinidir}/requirements/extras/confluentkafka.txt apicheck,linkcheck: -r{toxinidir}/requirements/docs.txt flake8,pydocstyle,mypy: -r{toxinidir}/requirements/pkgutils.txt @@ -45,9 +46,7 @@ commands = integration-kafka: pytest -xv -E kafka t/integration -n auto {posargs} basepython = - pypy3.8: pypy3.8 - pypy3.9: pypy3.9 - pypy3.10: pypy3.10 + pypy3: pypy3 3.8: python3.8 3.9: python3.9 3.10: python3.10 @@ -152,3 +151,17 @@ allowlist_externals = make commands = python -m cleanpy . make clean + +[testenv:parallel-integration] +description = Run all integration tests using {basepython} in parallel +allowlist_externals = tox +setenv = + PYTHONUNBUFFERED = 1 + PYTHONDONTWRITEBYTECODE = 1 +commands = + tox -e \ + 3.12-linux-integration-py-amqp,\ + 3.12-linux-integration-redis,\ + 3.12-linux-integration-mongodb,\ + 3.12-linux-integration-kafka \ + -p -o -- --exitfirst -n auto --dist=loadscope {posargs}