2013-03-10
Do you have a gem that needs to test against multiple versions of Rails? Doing it all can be complex, and while I have lots to say about this topic, but here’s one of the pieces: Travis build matrix.
Here’s what you want:
language: ruby
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- 2.0.0
- ruby-head
env:
- "RAILS_VERSION=3.2"
- "RAILS_VERSION=3.1"
- "RAILS_VERSION=3.0"
- "RAILS_VERSION=master"
matrix:
allow_failures:
- rvm: ruby-head
- env: "RAILS_VERSION=master"
exclude:
- rvm: 2.0.0
env: "RAILS_VERSION=3.0"
- rvm: 2.0.0
env: "RAILS_VERSION=3.1"
- rvm: 1.8.7
env: "RAILS_VERSION=master"
- rvm: 1.9.2
env: "RAILS_VERSION=master"
- rvm: ruby-head
env: "RAILS_VERSION=3.0"
- rvm: ruby-head
env: "RAILS_VERSION=3.1"
Here’s what all this does:
What do you think? Tweet at me if you have suggestions for improving this matrix.