Using MongoDB 2.6 with TravisCI Builds

At the time of writing this post TravisCI uses mongodb 2.4 (when you put in mongodb under services in .travis.yml) and does not support the new version 2.6 ‘out of the box’. However, if you do need 2.6 for your code to run properly you could easily install it your self. You can add the following to your before_install (in .travis.yml) to do that.


  - "sudo apt-key adv --keyserver hkp:// --recv 7F0CEB10"
  - "echo 'deb dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list"
  - "sudo apt-get update"
  - "sudo apt-get install mongodb-org-server”