Skip to content

Commit

Permalink
Fixed pypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Nusnus committed Sep 25, 2024
1 parent 37493a9 commit 9666c50
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 19 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -67,25 +67,35 @@ 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']
experimental: [false]
toxenv: [
'py-amqp',
'py-redis',
'py-mongodb',
'py-kafka'
]
experimental: [false]
include:
- python-version: pypy3.10
- python-version: pypy3.9
experimental: true
toxenv: 'py-amqp'
- python-version: pypy3.9
experimental: true
toxenv: 'py-redis'
- python-version: pypy3.9
experimental: true
toxenv: 'py-mongodb'
# - python-version: pypy3.9
# experimental: true
# toxenv: 'py-kafka'

steps:
- name: Install apt packages
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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'
pre-commit>=3.8.0; python_version >= '3.9'
35 changes: 24 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -21,6 +21,7 @@ python =
3.10: py310
3.11: py311
3.12: py312
pypy3: pypy3

[testenv]
sitepackages = False
Expand All @@ -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,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/default.txt
apicheck,pypy3,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/test.txt
apicheck,pypy3,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
Expand All @@ -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
Expand Down Expand Up @@ -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}

0 comments on commit 9666c50

Please sign in to comment.