diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b635573f2..aa0fc447a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,18 +34,24 @@ jobs: run: python -m pip install --upgrade pip setuptools virtualenv wheel - name: Install dependencies - run: python -m pip install --upgrade codecov tox tox-py + run: python -m pip install --upgrade codecov tox + + - name: Install tox-py + if: ${{ matrix.python-version == '3.6' }} + run: python -m pip install --upgrade tox-py - name: Run tox targets for ${{ matrix.python-version }} + if: ${{ matrix.python-version != '3.6' }} + run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .) + + - name: Run tox targets for ${{ matrix.python-version }} + if: ${{ matrix.python-version == '3.6' }} run: tox --py current - name: Run extra tox targets if: ${{ matrix.python-version == '3.9' }} run: | - python setup.py bdist_wheel - rm -r djangorestframework.egg-info # see #6139 tox -e base,dist,docs - tox -e dist --installpkg ./dist/djangorestframework-*.whl - name: Upload coverage run: | diff --git a/tox.ini b/tox.ini index 2b421f6c2..05cdd25dc 100644 --- a/tox.ini +++ b/tox.ini @@ -1,20 +1,13 @@ [tox] envlist = - {py36,py37,py38,py39}-django30, - {py36,py37,py38,py39}-django31, - {py36,py37,py38,py39,py310}-django32, - {py38,py39,py310}-{django40,django41,djangomain}, - {py311}-{django41,djangomain}, - base,dist,docs, - -[travis:env] -DJANGO = - 3.0: django30 - 3.1: django31 - 3.2: django32 - 4.0: django40 - 4.1: django41 - main: djangomain + {py36,py37,py38,py39}-django30 + {py36,py37,py38,py39}-django31 + {py36,py37,py38,py39,py310}-django32 + {py38,py39,py310}-{django40,django41,djangomain} + {py311}-{django41,djangomain} + base + dist + docs [testenv] commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning runtests.py --coverage {posargs} @@ -39,7 +32,7 @@ deps = -rrequirements/requirements-testing.txt [testenv:dist] -commands = ./runtests.py --no-pkgroot --staticfiles {posargs} +commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning runtests.py --no-pkgroot --staticfiles {posargs} deps = django -rrequirements/requirements-testing.txt