I'm using Travis CI to build my Python project. I'd like to test my project against different versions of Python, but then have a script that runs only if all of them are successful.
For example, this travis.yml doesn't do the job, since the after_success part runs after each of the Python builds:
language: python
python:
- '2.7'
- '3.2'
script:
- python setup.py test
after_success:
- # this runs both on 2.7 and 3.2
Is there any way to do this?
We are working on something like this, but unfortunately it's not possible right now directly from Travis.
You could use webhooks for this, which would make a request to a URL for you. Depending on what you need, this may work for you.
There are solutions at https://github.com/alrra/travis-after-all and https://github.com/dmakhno/travis_after_all .
It's not as clean in the .travis.yml file as your proposal, which (as noted by trask) is currently on hold as described at https://github.com/travis-ci/travis-ci/issues/929; the developers say "we are aware of the request but don't have an ETA on when it will be ready."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With