Skip to content

Commit

Permalink
Getting travis and coveralls to work again
Browse files Browse the repository at this point in the history
  • Loading branch information
mfogel committed Jan 31, 2016
1 parent 8a2c739 commit 60c7b8a
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 123 deletions.
48 changes: 44 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,50 @@
sudo: false
language: python
matrix:
include:
- python: "2.7"
env: TOXENV=py27-django18-sqlite
- python: "2.7"
env: TOXENV=py27-django18-postgres
- python: "2.7"
env: TOXENV=py27-django19-sqlite
- python: "2.7"
env: TOXENV=py27-django19-postgres
- python: "2.7"
env: TOXENV=flake8
- python: "2.7"
env: TOXENV=coverage
install: pip install tox coveralls
after_success: coveralls
- python: "3.2"
env: TOXENV=py32-django18-sqlite
script: tox --system-site-pacakges
- python: "3.2"
env: TOXENV=py32-django18-postgres
script: tox --system-site-pacakges
- python: "3.3"
env: TOXENV=py33-django18-sqlite
- python: "3.3"
env: TOXENV=py33-django18-postgres
- python: "3.4"
env: TOXENV=py34-django18-sqlite
- python: "3.4"
env: TOXENV=py34-django18-postgres
- python: "3.4"
env: TOXENV=py34-django19-sqlite
- python: "3.4"
env: TOXENV=py34-django19-postgres
- python: "3.5"
env: TOXENV=py35-django18-sqlite
- python: "3.5"
env: TOXENV=py35-django18-postgres
- python: "3.5"
env: TOXENV=py35-django19-sqlite
- python: "3.5"
env: TOXENV=py35-django19-postgres
install:
- pip install tox coveralls
- pip install tox
before_script:
- psql -c 'create database timezone_field_tests;' -U postgres
script:
- tox
- tox -e coverage
after_success:
- coveralls
143 changes: 24 additions & 119 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,134 +1,36 @@
[tox]
envlist =
py27-django18-sqlite, py32-django18-sqlite, py33-django18-sqlite, py34-django18-sqlite, py35-django18-sqlite,
py27-django18-postgres, py32-django18-postgres, py33-django18-postgres, py34-django18-postgres, py35-django18-postgres,
py27-django19-sqlite, py34-django19-sqlite, py35-django19-sqlite,
py27-django19-postgres, py34-django19-postgres, py35-django19-postgres,
flake8
{py27,py32,py33,py34,py35}-django18-{sqlite,postgres},
{py27,py34,py35}-django19-{sqlite,postgres},
flake8, coverage

[testenv]
basepython =
py27: python2.7
py32: python3.2
py33: python3.3
py34: python3.4
py35: python3.5
deps =
django18: django>=1.8,<1.9
django19: django>=1.9,<1.10
postgres: psycopg2
setenv =
DJANGO_SETTINGS_MODULE=timezone_field.tests.settings
sqlite: TEST_DB_ENGINE=sqlite
postgres: TEST_DB_ENGINE=postgres
commands = {envbindir}/django-admin.py test timezone_field
# changing the default working directory to avoid relative vs.
# absolute import errors when doing unittest discovery.
changedir = {toxworkdir}

# base settings for django18 on sqlite tests
[django18-sqlite]
setenv =
DJANGO_SETTINGS_MODULE=timezone_field.tests.settings
TEST_DB_ENGINE=sqlite
deps = django>=1.8,<1.9

# base settings for django18 on postgres tests
[django18-postgres]
setenv =
DJANGO_SETTINGS_MODULE=timezone_field.tests.settings
TEST_DB_ENGINE=postgres
deps =
django>=1.8,<1.9
psycopg2

# base settings for django19 on sqlite tests
[django19-sqlite]
setenv =
DJANGO_SETTINGS_MODULE=timezone_field.tests.settings
TEST_DB_ENGINE=sqlite
deps = django>=1.9,<1.10

# base settings for django19 on postgres tests
[django19-postgres]
setenv =
DJANGO_SETTINGS_MODULE=timezone_field.tests.settings
TEST_DB_ENGINE=postgres
deps =
django>=1.9,<1.10
psycopg2

[testenv:py27-django18-sqlite]
basepython = python2.7
deps = {[django18-sqlite]deps}
setenv = {[django18-sqlite]setenv}

[testenv:py32-django18-sqlite]
basepython = python3.2
deps = {[django18-sqlite]deps}
setenv = {[django18-sqlite]setenv}

[testenv:py33-django18-sqlite]
basepython = python3.3
deps = {[django18-sqlite]deps}
setenv = {[django18-sqlite]setenv}

[testenv:py34-django18-sqlite]
basepython = python3.4
deps = {[django18-sqlite]deps}
setenv = {[django18-sqlite]setenv}

[testenv:py35-django18-sqlite]
basepython = python3.5
deps = {[django18-sqlite]deps}
setenv = {[django18-sqlite]setenv}

[testenv:py27-django18-postgres]
basepython = python2.7
deps = {[django18-postgres]deps}
setenv = {[django18-postgres]setenv}

[testenv:py32-django18-postgres]
basepython = python3.2
deps = {[django18-postgres]deps}
setenv = {[django18-postgres]setenv}

[testenv:py33-django18-postgres]
basepython = python3.3
deps = {[django18-postgres]deps}
setenv = {[django18-postgres]setenv}

[testenv:py34-django18-postgres]
basepython = python3.4
deps = {[django18-postgres]deps}
setenv = {[django18-postgres]setenv}

[testenv:py35-django18-postgres]
basepython = python3.5
deps = {[django18-postgres]deps}
setenv = {[django18-postgres]setenv}

[testenv:py27-django19-sqlite]
basepython = python2.7
deps = {[django19-sqlite]deps}
setenv = {[django19-sqlite]setenv}

[testenv:py34-django19-sqlite]
basepython = python3.4
deps = {[django19-sqlite]deps}
setenv = {[django19-sqlite]setenv}

[testenv:py35-django19-sqlite]
basepython = python3.5
deps = {[django19-sqlite]deps}
setenv = {[django19-sqlite]setenv}

[testenv:py27-django19-postgres]
basepython = python2.7
deps = {[django18-postgres]deps}
setenv = {[django18-postgres]setenv}

[testenv:py34-django19-postgres]
basepython = python3.4
deps = {[django19-postgres]deps}
setenv = {[django19-postgres]setenv}

[testenv:py35-django19-postgres]
basepython = python3.5
deps = {[django19-postgres]deps}
setenv = {[django19-postgres]setenv}

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

[testenv:coverage]
basepython = python2.7
# The coverage results have to be copied back to the directory root
# so coveralls can find them.
# Doing that with python so we only use things inside the venv.
Expand All @@ -138,5 +40,8 @@ commands =
python -c "import os; os.rename('.coverage', '{toxinidir}/.coverage');"
deps =
coverage
{[django18-sqlite]deps}
setenv = {[django18-sqlite]setenv}
django>=1.8,<1.9
psycopg2
setenv =
DJANGO_SETTINGS_MODULE=timezone_field.tests.settings
postgres: TEST_DB_ENGINE=postgres

0 comments on commit 60c7b8a

Please sign in to comment.