Skip to content

Commit

Permalink
Merge pull request #108 from zostera/explicit-travis
Browse files Browse the repository at this point in the history
Use explicit test matrix in travis conf, adopt django-tables2 testenv naming
  • Loading branch information
dyve committed Aug 22, 2018
2 parents 0754c56 + 2810100 commit c513e0f
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 38 deletions.
37 changes: 28 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
language: python
sudo: false
cache: pip
python:
- "3.6"
- "3.5"
- "3.4"
- "2.7"
install: pip install tox-travis
script: tox
cache:
pip: true
addons:
postgresql: 9.6
apt:
packages:
- postgresql-9.6-postgis-2.3

install: pip install tox tox-travis
script: tox

matrix:
include:
- { python: 2.7, env: TOXENV=py27-1.11 }
- { python: 3.4, env: TOXENV=py34-1.11 }
- { python: 3.4, env: TOXENV=py34-2.0 }
- { python: 3.5, env: TOXENV=py35-1.11 }
- { python: 3.5, env: TOXENV=py35-2.0 }
- { python: 3.5, env: TOXENV=py35-2.1 }
- { python: 3.5, env: TOXENV=py35-master }
- { python: 3.6, env: TOXENV=py36-2.0 }
- { python: 3.6, env: TOXENV=py36-2.1 }
- { python: 3.6, env: TOXENV=py36-master }
- { python: 3.7-dev, env: TOXENV=py37-2.1 }
- { python: 3.7-dev, env: TOXENV=py37-master }
- { python: 3.6, env: TOXENV=docs }
- { python: 3.6, env: TOXENV=flake8 }

# we allow failures for versions which are not yet released:
allow_failures:
- env: TOXENV=py35-master
- env: TOXENV=py36-master
- env: TOXENV=py37-master
53 changes: 24 additions & 29 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
[tox]
envlist =
{py27}-django{111}
{py34}-django{111,20}
{py35}-django{111,20,21}
{py36}-django{111,20,21}
{py27}-{1.11},
{py34}-{1.11,2.0},
{py35}-{1.11,2.0,2.1,master},
{py36}-{1.11,2.0,2.1,master}
{py37}-{2.1,master}
flake8
docs

[testenv]
setenv =
PYTHONWARNINGS=module::DeprecationWarning
commands =
coverage run --source=bootstrap4 manage.py test -v1 --noinput
coverage report -m
deps =
coverage
1.11: Django>=1.11,<2.0
2.0: Django>=2.0,<2.1
2.1: Django==2.1
master: https://github.com/django/django/archive/master.tar.gz

[testenv:docs]
basepython = python
changedir = docs
Expand All @@ -17,36 +31,17 @@ deps =
commands = sphinx-build -b html -d _build/doctrees . _build/html

[testenv:flake8]
basepython = python
deps =
flake8
commands =
flake8

[testenv]
setenv =
PYTHONWARNINGS=module::DeprecationWarning
commands =
coverage run --source=bootstrap4 manage.py test -v1 --noinput
coverage report -m
deps =
coverage
tox-travis
django111: Django>=1.11,<2.0
django20: Django>=2.0,<2.1
django21: Django==2.1.0b1

[testenv:djangomaster]
ignore_outcome = True
basepython = python3.6
deps = flake8
commands = flake8

[flake8]
ignore = F401,E731,W503
exclude = .git,.tox,__pycache__
max-line-length = 120

[travis]
python =
python:
2.7: py27
3.4: py34
3.5: py35
3.6: py36, flake8, docs
3.6: py36, docs, flake8
3.7-dev: py37

0 comments on commit c513e0f

Please sign in to comment.