Is there a way to configure travis-ci to make the Python versions dependent on a certain env var?
Please consider the following travis.yml config:
language: python
python:
- "2.5"
- "2.6"
- "2.7"
env:
- DJANGO=1.3.4
- DJANGO=1.4.2
- DJANGO=https://github.com/django/django/zipball/master
install:
- pip install -q Django==$DJANGO --use-mirrors
- pip install -e . --use-mirrors
script:
- python src/runtests.py
Among Django 1.3 (DJANGO=1.3.4) and 1.4 (DJANGO=1.4.2) i also want to test against the latest development version of Django (DJANGO=https://github.com/django/django/zipball/master), which is basically Django 1.5.
The problem i see is that travis-ci will automatically run the integration against all specified Python versions. Django 1.5 however doesn't support Python 2.5 anymore. Is it possible to omit it for the Django development version so that i get integrations like this only:
- DJANGO=1.3.4 --> python "2.5", "2.6", "2.7"
- DJANGO=1.4.2 --> python "2.5", "2.6", "2.7"
- DJANGO=https://github.com/django/django/zipball/master --> python "2.6", "2.7"
UPDATE:
Here's a link to a live example based on Odi's answer which i've been using successfully for a few months: https://github.com/deschler/django-modeltranslation/blob/master/.travis.yml