I have a repo that contains multiple components, most of them in JavaScript (Node.js) and one written in Ruby (Ruby on Rails). I'd like to have one .travis.yml file that triggers one build that runs all the tests for each of the components. According to this Travis CI Google Group thread, there is no official support for this for now.
My directory structure looks like this:
.
├── buildserver
├── core
├── extensions
├── webapp
├── Vagrantfile
├── package.json
├── .travis.yml
└── Makefile
I want to be able to run specific versions of Ruby (2.2.2) and Node.js (0.12.2). I already have a make
target, so make test
runs appropriate test suite in each subdirectory.
It turns out that every VM, that runs your isolated test suite on Travis CI, comes with Node.js and Ruby pre-installed. By default you get Ruby 1.9.3 and Node.js 0.12.2 (but that may change as Travis team updates their environment), so even though you can only specify one language (e.g.
language: Ruby
) in your.travis.yml
file, you can still run both Ruby and Node.js programs on Travis CI VM.I decided to go with Node.js language set-up and install appropriate Ruby version (but I could have done the opposite with the same effect).
Here is my
.travis.yml
config file: