From 300b9c70fe7e7d99949f9f966787ef571908aeac Mon Sep 17 00:00:00 2001 From: Matt Molyneaux Date: Mon, 19 Jun 2017 19:13:12 +0100 Subject: [PATCH 1/3] Use tox-travis when running tests on travis This means we can now run tests against Python 3.5 and 3.6, where previously we could not. --- .travis.yml | 5 ++++- tox.ini | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9f572b4..defb820 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,10 @@ language: python sudo: false python: + - 2.7 + - 3.4 - 3.5 + - 3.6 cache: directories: - $HOME/.cache/pip @@ -9,7 +12,7 @@ services: - postgresql - mysql install: - - pip install tox + - pip install tox-travis before_script: - mysql -e 'create database test_project'; - psql -c 'create database test_project;' -U postgres; diff --git a/tox.ini b/tox.ini index 5152dbc..db73860 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,7 @@ envlist = coverage-erase {py27,py34,py35}-django{18,19,110,111}-{sqlite,postgres,mysql} + py36-django111-{sqlite,postgres,mysql} coverage-report flake8 @@ -22,6 +23,13 @@ commands = mysql: coverage run -a tests/runtests.py -d mysql coverage-report: coverage report +[travis] +python = + 2.7: py27 + 3.4: py34 + 3.5: py35, flake8 + 3.6: py36 + [flake8] max-line-length=120 exclude=build,venv,migrations,south_migrations,.tox From 729115994a5a21483a0b2a2ce69ab2afba9a3abe Mon Sep 17 00:00:00 2001 From: Matt Molyneaux Date: Mon, 19 Jun 2017 19:51:50 +0100 Subject: [PATCH 2/3] Make sure coverage reports are done for each run on travis Also, rename coverage-erase and coverage-report to begin and end to make tox.ini easier to read. --- tox.ini | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tox.ini b/tox.ini index db73860..88f25dd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,9 @@ [tox] envlist = - coverage-erase + begin {py27,py34,py35}-django{18,19,110,111}-{sqlite,postgres,mysql} py36-django111-{sqlite,postgres,mysql} - coverage-report + end flake8 [testenv] @@ -17,18 +17,18 @@ deps = postgres: psycopg2 mysql: mysqlclient commands = - coverage-erase: coverage erase + begin: coverage erase sqlite: coverage run -a tests/runtests.py postgres: coverage run -a tests/runtests.py -d psql mysql: coverage run -a tests/runtests.py -d mysql - coverage-report: coverage report + end: coverage report [travis] python = - 2.7: py27 - 3.4: py34 - 3.5: py35, flake8 - 3.6: py36 + 2.7: begin, py27, end + 3.4: begin, py34, end + 3.5: begin, py35, end, flake8 + 3.6: begin, py36, end [flake8] max-line-length=120 From 3eb3d19c4543f4a3680511a8386325bad7df3620 Mon Sep 17 00:00:00 2001 From: Matt Molyneaux Date: Mon, 19 Jun 2017 22:09:41 +0100 Subject: [PATCH 3/3] Try testing with 3.3 and Django 1.8 --- .travis.yml | 1 + tox.ini | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index defb820..8612e64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: python sudo: false python: - 2.7 + - 3.3 - 3.4 - 3.5 - 3.6 diff --git a/tox.ini b/tox.ini index 88f25dd..5bb0d5a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] envlist = begin + py33-django18-{sqlite,postgres,mysql} {py27,py34,py35}-django{18,19,110,111}-{sqlite,postgres,mysql} py36-django111-{sqlite,postgres,mysql} end @@ -26,6 +27,7 @@ commands = [travis] python = 2.7: begin, py27, end + 3.3: begin, py33, end 3.4: begin, py34, end 3.5: begin, py35, end, flake8 3.6: begin, py36, end