Skip to content

Commit

Permalink
Get travis working on all python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mfogel committed Mar 1, 2018
1 parent 517c35a commit 0dcf8db
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 57 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.tox
*.pyc
*.egg-info
htmlcov
49 changes: 9 additions & 40 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,20 @@
sudo: false
language: python

matrix:
include:
- python: "2.7"
env: TOXENV=flake8

- python: "2.7"
env: TOXENV=coverage
install: pip install tox coveralls
after_success: coveralls

- python: "2.7"
env: TOXENV=py27-django18-sqlite
- python: "2.7"
env: TOXENV=py27-django18-postgres
- python: "3.4"
env: TOXENV=py34-django18-sqlite
- python: "3.4"
env: TOXENV=py34-django18-postgres
- python: "3.5"
env: TOXENV=py35-django18-sqlite
- python: "3.5"
env: TOXENV=py35-django18-postgres

- python: "2.7"
env: TOXENV=py27-django111-sqlite
- python: "2.7"
env: TOXENV=py27-django111-postgres
- python: "3.4"
env: TOXENV=py34-django111-sqlite
- python: "3.4"
env: TOXENV=py34-django111-postgres
- python: "3.5"
env: TOXENV=py35-django111-sqlite
- python: "3.5"
env: TOXENV=py35-django111-postgres
- python: "3.6"
env: TOXENV=py35-django111-sqlite
- python: "3.6"
env: TOXENV=py35-django111-postgres
python:
- 2.7
- 3.4
- 3.5
- 3.6

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

before_script:
- psql -c 'create database timezone_field_tests;' -U postgres

script:
- tox

after_success:
- coveralls
33 changes: 16 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
[tox]
envlist =
{py27,py34,py35,py36}-{django18,django19,django110,django111}-{sqlite,postgres},
flake8, coverage
coverage-clean,
py27-{django18,django19,django110,django111}-{sqlite,postgres},
py34-{django18,django19,django110,django111}-{sqlite,postgres},
py35-{django18,django19,django110,django111}-{sqlite,postgres},
py36-django111-{sqlite,postgres},
coverage-report,
flake8

[testenv]
basepython =
py27: python2.7
py34: python3.4
py35: python3.5
py36: python3.6
commands = coverage run --include='*/timezone_field/*' {envbindir}/django-admin.py test tests
deps =
coverage
django18: django>=1.8,<1.9
django19: django>=1.9,<1.10
django110: django>=1.10,<1.11
Expand All @@ -20,19 +22,16 @@ setenv =
DJANGO_SETTINGS_MODULE=tests.settings
sqlite: TEST_DB_ENGINE=sqlite
postgres: TEST_DB_ENGINE=postgres
commands = {envbindir}/django-admin.py test tests

[testenv:flake8]
basepython = python2.7
commands = flake8
deps = flake8
commands = {envbindir}/flake8 {toxinidir}/timezone_field

[testenv:coverage]
basepython = python2.7
[testenv:coverage-clean]
commands = coverage erase

[testenv:coverage-report]
commands =
coverage erase
coverage run --include='*/timezone_field/*' {envbindir}/django-admin.py test tests
deps =
coverage
django>=1.11,<2.0
psycopg2
coverage report
coverage html

0 comments on commit 0dcf8db

Please sign in to comment.