Skip to content

Commit

Permalink
Update Travis CI matrix (chibisov#245)
Browse files Browse the repository at this point in the history
* Migrate testing matrix to use tox-travis

This migrates the existing versions of Python and Django that are tested in Travis to be replicated within the Tox matrix. This also changes Travis CI to run tests using tox-travis, which will automatically run all of the test envionments matching a specific Python version.

* Test on Django 2.1

It's been released for a few months now, so we may as well test on it.

* Test on DRF 3.8 and 3.9

Previously this was only being tested on the latest version of DRF, instead of being tested on each minor version.

* Test on Python 3.7

* Fix Tox config misspelling

* Remove ancient requirements file

* Add Python 3.7 to Tox config

* Apparently we use Django-Nose in tests?

These tests are so damn old...

* Tests require the old mock module

We should be able to swap this out with the new Mock module provided by Python 3, but that's a lot of effort that I am not in the mood to put in.

* Revert removal of that old requirements file

I've made a mistake.

* Stop testing on Django 2.1

These test failure are known, I'll let them be handled in the other pull request.

* Added back Django Guardian to testing requirements
  • Loading branch information
kevin-brown authored and auvipy committed Jan 6, 2019
1 parent e9e76d5 commit 549498b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 34 deletions.
18 changes: 7 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
language: python
cache: pip
dist: xenial
sudo: false

python:
- "3.6"
- "3.5"
- "3.4"

env:
- TOXENV=django.1.11
- TOXENV=django.2.0

matrix:
fast_finish: true
- 3.4
- 3.5
- 3.6
- 3.7

install:
- pip install tox
- pip install tox tox-travis

script:
- tox
2 changes: 1 addition & 1 deletion tests_app/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ nose
django-nose
django-filter==1.1
mock
ipdb
ipdb
33 changes: 11 additions & 22 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
[tox]
envlist =
django.2.0
django.1.11

py34-django{111,20}-drf{38,39}
py35-django{111,20}-drf{38,39}
py36-django{111,20}-drf{38,39}
py37-django{111,20}-drf{38,39}

[testenv]
deps=
-rtests_app/requirements.txt
django-guardian>=1.4.4
drf38: djangorestframework>=3.8.1,<3.9
drf39: djangorestframework>=3.9.0,<3.10
django111: Django>=1.11,<2.0
django20: Django>=2.0,<2.1
django21: Django>=2.1,<2.2
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/tests_app
commands=
{envbindir}/django-admin.py test --settings=settings {posargs}


[testenv:django.1.11]
deps=
{[testenv]deps}
Django>=1.11,<2.0
djangorestframework>=3.8.1
django-guardian>=1.4.4


[testenv:django.2.0]
deps=
{[testenv]deps}
Django>=2.0,<2.1
djangorestframework>=3.8.1
django-guardian>=1.4.4


{envbindir}/django-admin.py test --settings=settings {posargs}

0 comments on commit 549498b

Please sign in to comment.