Skip to content

Commit 59ae95b

Browse files
authored
Upgrade to tox 4 (#8795)
1 parent 1355890 commit 59ae95b

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,24 @@ jobs:
3434
run: python -m pip install --upgrade pip setuptools virtualenv wheel
3535

3636
- name: Install dependencies
37-
run: python -m pip install --upgrade codecov tox tox-py
37+
run: python -m pip install --upgrade codecov tox
38+
39+
- name: Install tox-py
40+
if: ${{ matrix.python-version == '3.6' }}
41+
run: python -m pip install --upgrade tox-py
42+
43+
- name: Run tox targets for ${{ matrix.python-version }}
44+
if: ${{ matrix.python-version != '3.6' }}
45+
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .)
3846

3947
- name: Run tox targets for ${{ matrix.python-version }}
48+
if: ${{ matrix.python-version == '3.6' }}
4049
run: tox --py current
4150

4251
- name: Run extra tox targets
4352
if: ${{ matrix.python-version == '3.9' }}
4453
run: |
45-
python setup.py bdist_wheel
46-
rm -r djangorestframework.egg-info # see #6139
4754
tox -e base,dist,docs
48-
tox -e dist --installpkg ./dist/djangorestframework-*.whl
4955
5056
- name: Upload coverage
5157
run: |

tox.ini

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
[tox]
22
envlist =
3-
{py36,py37,py38,py39}-django30,
4-
{py36,py37,py38,py39}-django31,
5-
{py36,py37,py38,py39,py310}-django32,
6-
{py38,py39,py310}-{django40,django41,djangomain},
7-
{py311}-{django41,djangomain},
8-
base,dist,docs,
9-
10-
[travis:env]
11-
DJANGO =
12-
3.0: django30
13-
3.1: django31
14-
3.2: django32
15-
4.0: django40
16-
4.1: django41
17-
main: djangomain
3+
{py36,py37,py38,py39}-django30
4+
{py36,py37,py38,py39}-django31
5+
{py36,py37,py38,py39,py310}-django32
6+
{py38,py39,py310}-{django40,django41,djangomain}
7+
{py311}-{django41,djangomain}
8+
base
9+
dist
10+
docs
1811

1912
[testenv]
2013
commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning runtests.py --coverage {posargs}
@@ -39,7 +32,7 @@ deps =
3932
-rrequirements/requirements-testing.txt
4033

4134
[testenv:dist]
42-
commands = ./runtests.py --no-pkgroot --staticfiles {posargs}
35+
commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning runtests.py --no-pkgroot --staticfiles {posargs}
4336
deps =
4437
django
4538
-rrequirements/requirements-testing.txt

0 commit comments

Comments
 (0)