Upgrade to tox 4 (#8795)

This commit is contained in:
Adam Johnson 2022-12-08 08:01:07 +00:00 committed by GitHub
parent 1355890f9f
commit 59ae95b22f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 20 deletions

View File

@ -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: |

25
tox.ini
View File

@ -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