alonisser
alonisser

Reputation: 12068

Travis-ci tests an option I excluded. I'm missing something the testing matrix setup,

for some reason Travis-CI run all the matrix including all 3.3 (and not only vs django 1.6) the .travis.yml code:

language: python
python:
  - "2.6"
  - "2.7"
  - "3.3"
env:
  - DJANGO=Django==1.5.1
  - DJANGO=Django==1.4.3
  - DJANGO=https://www.djangoproject.com/download/1.6b1/tarball/
matrix:
  # since isn't a Django release
  allow failures:
  - env: DJANGO=https://www.djangoproject.com/download/1.6b1/tarball/
  # since most django versions won't work with 3.3. excluded won't run on the matrix
  exclude:
  - python: "3.3"
  #the only version of django that's supposed to support 3.3
  include:
  - python: "3.3"
    env: DJANGO=https://www.djangoproject.com/download/1.6b1/tarball/

install:
  - pip install -q $DJANGO --use-mirrors
  - pip install -r requirements.txt --use-mirrors
  - pip install -q django-setuptest --use-mirrors
script:
  - python setup.py test

what am I missing? thanks for the help

Upvotes: 0

Views: 691

Answers (1)

sarahhodne
sarahhodne

Reputation: 10116

You could do it like this:

language: python
python:
  - "2.6"
  - "2.7"
env:
  - DJANGO=Django==1.5.1
  - DJANGO=Django==1.4.3
  - DJANGO=https://www.djangoproject.com/download/1.6b1/tarball/
matrix:
  # since isn't a Django release
  allow_failures:
  - env: DJANGO=https://www.djangoproject.com/download/1.6b1/tarball/
  #the only version of django that's supposed to support 3.3
  include:
  - python: "3.3"
    env: DJANGO=https://www.djangoproject.com/download/1.6b1/tarball/

install:
  - pip install -q $DJANGO --use-mirrors
  - pip install -r requirements.txt --use-mirrors
  - pip install -q django-setuptest --use-mirrors
script:
  - python setup.py test

Basically, for every matrix.exclude, you have to specify the entire config for a job. So to remove one of the 3.3 jobs you would do this:

matrix:
  exclude:
    - python: "3.3"
      env: DJANGO=Django==1.5.1

You would then have to add another one for 1.4.3 as well. Just removing "3.3" from python is easier, since it'll be added with the matrix.include anyways.

Upvotes: 1

Related Questions