diff --git a/.github/workflows/test-common.yml b/.github/workflows/test-common.yml index d3922937fe..06a5b1f80f 100644 --- a/.github/workflows/test-common.yml +++ b/.github/workflows/test-common.yml @@ -59,8 +59,6 @@ jobs: pip install codecov tox - name: Run Tests - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-aiohttp.yml b/.github/workflows/test-integration-aiohttp.yml index 73483454c2..5d67bc70ce 100644 --- a/.github/workflows/test-integration-aiohttp.yml +++ b/.github/workflows/test-integration-aiohttp.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test aiohttp - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-asgi.yml b/.github/workflows/test-integration-asgi.yml index 16715ca230..a84a0cf8d1 100644 --- a/.github/workflows/test-integration-asgi.yml +++ b/.github/workflows/test-integration-asgi.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test asgi - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-aws_lambda.yml b/.github/workflows/test-integration-aws_lambda.yml index 4d795a642d..22ed7f4945 100644 --- a/.github/workflows/test-integration-aws_lambda.yml +++ b/.github/workflows/test-integration-aws_lambda.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test aws_lambda - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-beam.yml b/.github/workflows/test-integration-beam.yml index 0f6df2df0b..03a484537c 100644 --- a/.github/workflows/test-integration-beam.yml +++ b/.github/workflows/test-integration-beam.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test beam - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-boto3.yml b/.github/workflows/test-integration-boto3.yml index 8f390fb309..cbb4ec7db1 100644 --- a/.github/workflows/test-integration-boto3.yml +++ b/.github/workflows/test-integration-boto3.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test boto3 - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-bottle.yml b/.github/workflows/test-integration-bottle.yml index b2c3fcc92b..2fee720f4d 100644 --- a/.github/workflows/test-integration-bottle.yml +++ b/.github/workflows/test-integration-bottle.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test bottle - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-celery.yml b/.github/workflows/test-integration-celery.yml index 927a0371cd..7042f8d493 100644 --- a/.github/workflows/test-integration-celery.yml +++ b/.github/workflows/test-integration-celery.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test celery - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-chalice.yml b/.github/workflows/test-integration-chalice.yml index 44fe01e19f..d8240fe024 100644 --- a/.github/workflows/test-integration-chalice.yml +++ b/.github/workflows/test-integration-chalice.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test chalice - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-django.yml b/.github/workflows/test-integration-django.yml index 93c792b7b7..b309b3fec5 100644 --- a/.github/workflows/test-integration-django.yml +++ b/.github/workflows/test-integration-django.yml @@ -66,8 +66,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test django - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-falcon.yml b/.github/workflows/test-integration-falcon.yml index 956e8d5ba7..6141dc2917 100644 --- a/.github/workflows/test-integration-falcon.yml +++ b/.github/workflows/test-integration-falcon.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test falcon - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-fastapi.yml b/.github/workflows/test-integration-fastapi.yml index 2dc8f1e171..838cc43e4a 100644 --- a/.github/workflows/test-integration-fastapi.yml +++ b/.github/workflows/test-integration-fastapi.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test fastapi - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-flask.yml b/.github/workflows/test-integration-flask.yml index 96263508da..16e318cedc 100644 --- a/.github/workflows/test-integration-flask.yml +++ b/.github/workflows/test-integration-flask.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test flask - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-gcp.yml b/.github/workflows/test-integration-gcp.yml index eefdfe1aae..ca6275a537 100644 --- a/.github/workflows/test-integration-gcp.yml +++ b/.github/workflows/test-integration-gcp.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test gcp - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-httpx.yml b/.github/workflows/test-integration-httpx.yml index 9f5ac92a3f..05347aa5a4 100644 --- a/.github/workflows/test-integration-httpx.yml +++ b/.github/workflows/test-integration-httpx.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test httpx - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-pure_eval.yml b/.github/workflows/test-integration-pure_eval.yml index 1d8f7e1beb..4118ce7ecc 100644 --- a/.github/workflows/test-integration-pure_eval.yml +++ b/.github/workflows/test-integration-pure_eval.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test pure_eval - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-pymongo.yml b/.github/workflows/test-integration-pymongo.yml index fb961558ac..a691e69d1c 100644 --- a/.github/workflows/test-integration-pymongo.yml +++ b/.github/workflows/test-integration-pymongo.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test pymongo - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-pyramid.yml b/.github/workflows/test-integration-pyramid.yml index ad7bc43e85..59fbaf88ee 100644 --- a/.github/workflows/test-integration-pyramid.yml +++ b/.github/workflows/test-integration-pyramid.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test pyramid - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-quart.yml b/.github/workflows/test-integration-quart.yml index b9d82e53bc..aae555648e 100644 --- a/.github/workflows/test-integration-quart.yml +++ b/.github/workflows/test-integration-quart.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test quart - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-redis.yml b/.github/workflows/test-integration-redis.yml index 074c41fe5b..7d5eb18fb9 100644 --- a/.github/workflows/test-integration-redis.yml +++ b/.github/workflows/test-integration-redis.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test redis - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-rediscluster.yml b/.github/workflows/test-integration-rediscluster.yml index 06962926fa..453d4984a9 100644 --- a/.github/workflows/test-integration-rediscluster.yml +++ b/.github/workflows/test-integration-rediscluster.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test rediscluster - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-requests.yml b/.github/workflows/test-integration-requests.yml index 5650121a51..d07b8a7ec1 100644 --- a/.github/workflows/test-integration-requests.yml +++ b/.github/workflows/test-integration-requests.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test requests - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-rq.yml b/.github/workflows/test-integration-rq.yml index 3e3ead8118..0a1b1da443 100644 --- a/.github/workflows/test-integration-rq.yml +++ b/.github/workflows/test-integration-rq.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test rq - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-sanic.yml b/.github/workflows/test-integration-sanic.yml index 37ffd84bb9..a3966087c6 100644 --- a/.github/workflows/test-integration-sanic.yml +++ b/.github/workflows/test-integration-sanic.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test sanic - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-sqlalchemy.yml b/.github/workflows/test-integration-sqlalchemy.yml index c57fc950b7..a1a535089f 100644 --- a/.github/workflows/test-integration-sqlalchemy.yml +++ b/.github/workflows/test-integration-sqlalchemy.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test sqlalchemy - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-starlette.yml b/.github/workflows/test-integration-starlette.yml index e4083f72d5..0e34d851a4 100644 --- a/.github/workflows/test-integration-starlette.yml +++ b/.github/workflows/test-integration-starlette.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test starlette - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-tornado.yml b/.github/workflows/test-integration-tornado.yml index de5d02f6e7..cfe39f06d1 100644 --- a/.github/workflows/test-integration-tornado.yml +++ b/.github/workflows/test-integration-tornado.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test tornado - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/.github/workflows/test-integration-trytond.yml b/.github/workflows/test-integration-trytond.yml index 10853341e2..bb5997f27d 100644 --- a/.github/workflows/test-integration-trytond.yml +++ b/.github/workflows/test-integration-trytond.yml @@ -49,8 +49,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test trytond - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/scripts/runtox.sh b/scripts/runtox.sh index a658da4132..8b4c4a1bef 100755 --- a/scripts/runtox.sh +++ b/scripts/runtox.sh @@ -1,4 +1,8 @@ #!/bin/bash + +# Usage: sh scripts/runtox.sh py3.7 +# Runs all environments with substring py3.7 and the given arguments for pytest + set -ex if [ -n "$TOXPATH" ]; then @@ -9,22 +13,7 @@ else TOXPATH=./.venv/bin/tox fi -# Usage: sh scripts/runtox.sh py3.7 -# Runs all environments with substring py3.7 and the given arguments for pytest - -if [ -n "$1" ]; then - searchstring="$1" -elif [ -n "$CI_PYTHON_VERSION" ]; then - searchstring="$(echo py$CI_PYTHON_VERSION | sed -e 's/pypypy/pypy/g' -e 's/-dev//g')" - if [ "$searchstring" = "pypy-2.7" ]; then - searchstring=pypy - fi -elif [ -n "$AZURE_PYTHON_VERSION" ]; then - searchstring="$(echo py$AZURE_PYTHON_VERSION | sed -e 's/pypypy/pypy/g' -e 's/-dev//g')" - if [ "$searchstring" = pypy2 ]; then - searchstring=pypy - fi -fi +searchstring="$1" export TOX_PARALLEL_NO_SPINNER=1 -exec $TOXPATH -p auto -e $($TOXPATH -l | grep "$searchstring" | tr $'\n' ',') -- "${@:2}" +exec $TOXPATH -p auto -e "$($TOXPATH -l | grep "$searchstring" | tr $'\n' ',')" -- "${@:2}" diff --git a/scripts/split-tox-gh-actions/ci-yaml.txt b/scripts/split-tox-gh-actions/ci-yaml.txt index f2b6f97c27..b9ecdf39e7 100644 --- a/scripts/split-tox-gh-actions/ci-yaml.txt +++ b/scripts/split-tox-gh-actions/ci-yaml.txt @@ -41,8 +41,6 @@ jobs: pip install codecov "tox>=3,<4" - name: Test {{ framework }} - env: - CI_PYTHON_VERSION: ${{ matrix.python-version }} timeout-minutes: 45 shell: bash run: | diff --git a/tox.ini b/tox.ini index 22eac59db8..51a92a07c9 100644 --- a/tox.ini +++ b/tox.ini @@ -30,77 +30,104 @@ envlist = # Django 4.x {py3.8,py3.9,py3.10}-django-v{4.0,4.1} + # Flask {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-flask-v{0.11,0.12,1.0} {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-flask-v1.1 {py3.6,py3.8,py3.9,py3.10}-flask-v2.0 - {py3.7,py3.8,py3.9,py3.10}-asgi + # FastAPI + {py3.7,py3.8,py3.9,py3.10}-fastapi + # Starlette {py3.7,py3.8,py3.9,py3.10}-starlette-v{0.19.1,0.20,0.21} - {py3.7,py3.8,py3.9,py3.10}-fastapi - + # Quart {py3.7,py3.8,py3.9,py3.10}-quart + # Bottle {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-bottle-v0.12 + # Falcon {py2.7,py3.5,py3.6,py3.7}-falcon-v1.4 {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-falcon-v2.0 + # Sanic {py3.5,py3.6,py3.7}-sanic-v{0.8,18} {py3.6,py3.7}-sanic-v19 {py3.6,py3.7,py3.8}-sanic-v20 {py3.7,py3.8,py3.9,py3.10}-sanic-v21 {py3.7,py3.8,py3.9,py3.10}-sanic-v22 + # Beam + py3.7-beam-v{2.12,2.13,2.32,2.33} + + # Celery {py2.7}-celery-v3 {py2.7,py3.5,py3.6}-celery-v{4.1,4.2} {py2.7,py3.5,py3.6,py3.7,py3.8}-celery-v{4.3,4.4} {py3.6,py3.7,py3.8}-celery-v{5.0} {py3.7,py3.8,py3.9,py3.10}-celery-v{5.1,5.2} - py3.7-beam-v{2.12,2.13,2.32,2.33} + # Chalice + {py3.6,py3.7,py3.8}-chalice-v{1.16,1.17,1.18,1.19,1.20} + + # Asgi + {py3.7,py3.8,py3.9,py3.10}-asgi + # AWS Lambda # The aws_lambda tests deploy to the real AWS and have their own matrix of Python versions. py3.7-aws_lambda + # GCP py3.7-gcp + # Pyramid {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-pyramid-v{1.6,1.7,1.8,1.9,1.10} - {py2.7,py3.5,py3.6}-rq-v{0.6,0.7,0.8,0.9,0.10,0.11} - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-rq-v{0.12,0.13,1.0,1.1,1.2,1.3} - {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-rq-v{1.4,1.5} - + # AIOHTTP py3.7-aiohttp-v3.5 {py3.7,py3.8,py3.9,py3.10}-aiohttp-v3.6 + # Tornado {py3.7,py3.8,py3.9}-tornado-v{5} {py3.7,py3.8,py3.9,py3.10}-tornado-v{6} + # Trytond {py3.5,py3.6,py3.7,py3.8,py3.9}-trytond-v{4.6,5.0,5.2} {py3.6,py3.7,py3.8,py3.9,py3.10}-trytond-v{5.4} - {py2.7,py3.8,py3.9}-requests - + # Redis {py2.7,py3.7,py3.8,py3.9}-redis - {py2.7,py3.7,py3.8,py3.9}-rediscluster-v{1,2.1.0,2} - {py2.7,py3.7,py3.8,py3.9,py3.10}-sqlalchemy-v{1.2,1.3} - - {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-pure_eval - - {py3.6,py3.7,py3.8}-chalice-v{1.16,1.17,1.18,1.19,1.20} + # Redis Cluster + {py2.7,py3.7,py3.8,py3.9}-rediscluster-v{1,2.1.0,2} - {py2.7,py3.6,py3.7,py3.8}-boto3-v{1.9,1.10,1.11,1.12,1.13,1.14,1.15,1.16} + # RQ (Redis Queue) + {py2.7,py3.5,py3.6}-rq-v{0.6,0.7,0.8,0.9,0.10,0.11} + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-rq-v{0.12,0.13,1.0,1.1,1.2,1.3} + {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-rq-v{1.4,1.5} - {py3.6,py3.7,py3.8,py3.9,py3.10}-httpx-v{0.16,0.17} + # SQL Alchemy + {py2.7,py3.7,py3.8,py3.9,py3.10}-sqlalchemy-v{1.2,1.3} + # Mongo DB {py2.7,py3.6}-pymongo-v{3.1} {py2.7,py3.6,py3.7,py3.8,py3.9}-pymongo-v{3.12} {py3.6,py3.7,py3.8,py3.9,py3.10}-pymongo-v{4.0} {py3.7,py3.8,py3.9,py3.10}-pymongo-v{4.1,4.2} + # HTTPX + {py3.6,py3.7,py3.8,py3.9,py3.10}-httpx-v{0.16,0.17} + + # Requests + {py2.7,py3.8,py3.9}-requests + + # pure_eval + {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-pure_eval + + # Boto3 + {py2.7,py3.6,py3.7,py3.8}-boto3-v{1.9,1.10,1.11,1.12,1.13,1.14,1.15,1.16} + [testenv] deps = # if you change test-requirements.txt and your change is not being reflected @@ -361,10 +388,8 @@ commands = ; https://github.com/pytest-dev/pytest/issues/5532 {py3.5,py3.6,py3.7,py3.8,py3.9}-flask-v{0.11,0.12}: pip install pytest<5 {py3.6,py3.7,py3.8,py3.9}-flask-v{0.11}: pip install Werkzeug<2 - ; https://github.com/pallets/flask/issues/4455 {py3.7,py3.8,py3.9,py3.10}-flask-v{0.11,0.12,1.0,1.1}: pip install "itsdangerous>=0.24,<2.0" "markupsafe<2.0.0" "jinja2<3.1.1" - ; https://github.com/more-itertools/more-itertools/issues/578 py3.5-flask-v{0.11,0.12}: pip install more-itertools<8.11.0