From 28b449e793eab2d4dda8c9bd63a55083967a77c7 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 21 Jun 2018 12:09:54 +0200 Subject: [PATCH] tox/travis: test optionals optionally --- .travis.yml | 9 +++++++++ tox.ini | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f0d2e05f2..16bdf2265 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,8 @@ matrix: - { python: "3.6", env: DJANGO=master } - { python: "3.6", env: DJANGO=1.11 } - { python: "3.6", env: DJANGO=2.0 } + - { python: "3.6", env: DJANGO=2.0 } + - { python: "3.6", env: TOXENV=py36-django20-optionals } - { python: "3.6", env: DJANGO=2.1 } - { python: "2.7", env: TOXENV=lint } - { python: "2.7", env: TOXENV=docs } @@ -32,6 +34,13 @@ matrix: - tox --installpkg ./dist/djangorestframework-*.whl - tox # test sdist + - python: "3.6" + env: TOXENV=dist-optionals + script: + - python setup.py bdist_wheel + - tox --installpkg ./dist/djangorestframework-*.whl + - tox # test sdist + exclude: - { python: "2.7", env: DJANGO=master } - { python: "2.7", env: DJANGO=2.0 } diff --git a/tox.ini b/tox.ini index 852de5e6e..5749fd6c7 100644 --- a/tox.ini +++ b/tox.ini @@ -27,14 +27,18 @@ deps = django20: Django>=2.0,<2.1 django21: Django>=2.1b1,<2.2 djangomaster: https://github.com/django/django/archive/master.tar.gz + optionals: -rrequirements/requirements-optionals.txt -rrequirements/requirements-testing.txt - -rrequirements/requirements-optionals.txt [testenv:dist] commands = ./runtests.py --fast {posargs} --no-pkgroot --staticfiles -rw deps = django -rrequirements/requirements-testing.txt + +[testenv:dist-optionals] +commands = {[testenv:dist]commands} +deps = {[testenv:dist]deps} -rrequirements/requirements-optionals.txt [testenv:lint]