Created
December 18, 2017 14:59
-
-
Save mkows/793f640ae85cb801cc4efa5b00b200a7 to your computer and use it in GitHub Desktop.
TravisCI: Specify custom MongoDB version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# e.g. for MongoDB 2.6 | |
# | |
# Follows MongoDB for Ubuntu installation https://docs.mongodb.com/v2.6/tutorial/install-mongodb-on-ubuntu/ | |
# note: `--allow-downgrades` flag for apt-get install may be required | |
language: scala | |
scala: 2.11.11 | |
jdk: openjdk8 | |
before_script: | |
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
- echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list | |
- sudo apt-get update | |
- sudo apt-get install -y mongodb-org=2.6.12 mongodb-org-server=2.6.12 mongodb-org-shell=2.6.12 mongodb-org-mongos=2.6.12 mongodb-org-tools=2.6.12 --allow-downgrades | |
- sleep 15 # https://docs.travis-ci.com/user/database-setup/#MongoDB-does-not-immediately-accept-connections | |
script: | |
- sbt ++$TRAVIS_SCALA_VERSION test | |
after_script: | |
- pkill mongod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment