Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Travis CI to allow multiple failues for various python version

I have the following .travis.yml which I would expect to allow failures on python 2.6, 2.7 and nightly. For some reason it only recognises the nightly as allowed to fail, and the build fails due to 2.6 failing.

I'm guessing it might be the default and that it doesn't recognise my allow_failures section at all. travis-lint produces no errors.

Any ideas as to what goes wrong?

language: python
python:
  - "2.6"
  - "2.7"
  - "3.2"
  - "3.3"
  - "3.4"
  - "nightly"
matrix:
  allow_failures:
    - python: 2.6
    - python: 2.7
    - python: nightly
# command to install dependencies
install:
  - "python setup.py develop"
# command to run tests
script: py.test -v mandelbrot
like image 855
kidmose Avatar asked Apr 26 '26 23:04

kidmose


1 Answers

It seems that the allow_failures element under the matrix elements only applies to what is defined inside the matrix - makes sense now that I see it.

Fix:

matrix:
  include:
    - python: "2.6"
    - python: "2.7"
    - python: "3.2"
    - python: "3.3"
    - python: "3.4"
    - python: "nightly"
  allow_failures:
    - python: "2.6"
    - python: "3.2"
    - python: "nightly"
like image 155
kidmose Avatar answered Apr 29 '26 12:04

kidmose



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!