Skip to content

Commit

Permalink
Run Travis tests for multiple MongoDB versions
Browse files Browse the repository at this point in the history
Repeating same environment variable causes TravisCI to run tests with both MongoDB versions on each NodeJS environment.

I'm not sure if this is too much testing but hey one can never be too careful, especially since MongoDB tends to move kinda fast and deprecate features often.

Docs: https://docs.travis-ci.com/user/environment-variables/
  • Loading branch information
simison committed Jul 21, 2017
1 parent d8e1da3 commit 7999ce6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ node_js:
- "7"
- "8"
script: make test-once
env:
matrix:
- MONGODB_VER=2.6.6
- MONGODB_VER=3.4.6
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.6 mongodb-org-server=2.6.6 mongodb-org-shell=2.6.6 mongodb-org-mongos=2.6.6 mongodb-org-tools=2.6.6
- sudo apt-get install -y mongodb-org=$MONGODB_VER mongodb-org-server=$MONGODB_VER mongodb-org-shell=$MONGODB_VER mongodb-org-mongos=$MONGODB_VER mongodb-org-tools=$MONGODB_VER
- sleep 15 #mongo may not be responded directly. See http://docs.travis-ci.com/user/database-setup/#MongoDB
- mongo --version
after_script: make test-coveralls
Expand Down

0 comments on commit 7999ce6

Please sign in to comment.