Skip to content

Commit 49fd6b7

Browse files
committed
Merge pull request #207 from blueyed/travis-main-pythons-foreach-django
Travis: test all Django versions against Python 2 and 3
2 parents 0ec741b + edeb36c commit 49fd6b7

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ env:
99
- TESTENV=python2.6-1.6-sqlite_file
1010
- TESTENV=python2.7-1.3-sqlite_file
1111
- TESTENV=python2.7-1.4-sqlite_file
12+
- TESTENV=python2.7-1.5-sqlite_file
13+
- TESTENV=python2.7-1.6-sqlite_file
14+
- TESTENV=python2.7-1.7-sqlite_file
15+
- TESTENV=python2.7-1.8-sqlite_file
1216
- TESTENV=python2.7-master-mysql_innodb
1317
- TESTENV=python2.7-master-mysql_myisam
1418
- TESTENV=python2.7-master-sqlite_file

generate_configurations.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def is_pypy(self):
2424

2525
# Python to run tox.
2626
RUN_PYTHON = '3.4'
27+
PYTHON_MAIN_VERSIONS = ['python2.7', 'python3.4']
2728
PYTHON_VERSIONS = ['python2.6', 'python2.7', 'python3.2', 'python3.3',
2829
'python3.4', 'pypy', 'pypy3']
2930
PYTEST_VERSIONS = ['2.6.4']
@@ -160,6 +161,10 @@ def find_and_add(variations, env_getter):
160161
result.add(env)
161162
break
162163

164+
# Add all Django versions for each main python version (2.x and 3.x).
165+
find_and_add(itertools.product(PYTHON_MAIN_VERSIONS, DJANGO_VERSIONS),
166+
lambda env: (env.python_version, env.django_version))
167+
163168
find_and_add(PYTHON_VERSIONS, lambda env: env.python_version)
164169
find_and_add(PYTEST_VERSIONS, lambda env: env.pytest_version)
165170
find_and_add(DJANGO_VERSIONS, lambda env: env.django_version)

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = pypy-master-sqlite_file,pypy3-master-sqlite_file,python2.6-1.6-sqlite_file,python2.7-1.3-sqlite_file,python2.7-1.4-sqlite_file,python2.7-master-mysql_innodb,python2.7-master-mysql_myisam,python2.7-master-sqlite_file,python3.2-master-sqlite_file,python3.3-master-sqlite_file,python3.4-1.5-sqlite_file,python3.4-1.6-sqlite_file,python3.4-1.7-sqlite_file,python3.4-1.8-sqlite_file,python3.4-master-postgres,python3.4-master-sqlite,python3.4-master-sqlite_file,checkqa-python2.6,checkqa-python2.7,checkqa-python3.2,checkqa-python3.3,checkqa-python3.4,checkqa-pypy,checkqa-pypy3
2+
envlist = pypy-master-sqlite_file,pypy3-master-sqlite_file,python2.6-1.6-sqlite_file,python2.7-1.3-sqlite_file,python2.7-1.4-sqlite_file,python2.7-1.5-sqlite_file,python2.7-1.6-sqlite_file,python2.7-1.7-sqlite_file,python2.7-1.8-sqlite_file,python2.7-master-mysql_innodb,python2.7-master-mysql_myisam,python2.7-master-sqlite_file,python3.2-master-sqlite_file,python3.3-master-sqlite_file,python3.4-1.5-sqlite_file,python3.4-1.6-sqlite_file,python3.4-1.7-sqlite_file,python3.4-1.8-sqlite_file,python3.4-master-postgres,python3.4-master-sqlite,python3.4-master-sqlite_file,checkqa-python2.6,checkqa-python2.7,checkqa-python3.2,checkqa-python3.3,checkqa-python3.4,checkqa-pypy,checkqa-pypy3
33

44
[testenv]
55
whitelist_externals =

0 commit comments

Comments
 (0)