language: ruby

rvm:
  - 2.3
  - 2.4
  - 2.5

env:
  global:
    - COVERAGE=true JRUBY_OPTS=--debug
  matrix:
    - MONGODB=3.0.15
    - MONGODB=3.2.18
    - MONGODB=3.4.10
    # TODO: - MONGODB=3.6.1 - needs a newer version of the mongoid gem, it seems

sudo: false

cache: bundler

before_install:
  - gem update --system

before_script:
  - wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB}.tgz
  - tar xzf mongodb-linux-x86_64-${MONGODB}.tgz
  - ${PWD}/mongodb-linux-x86_64-${MONGODB}/bin/mongod --version
  - mkdir ${PWD}/mongodb-linux-x86_64-${MONGODB}/data
  - >
    ${PWD}/mongodb-linux-x86_64-${MONGODB}/bin/mongod
    --dbpath ${PWD}/mongodb-linux-x86_64-${MONGODB}/data
    --logpath ${PWD}/mongodb-linux-x86_64-${MONGODB}/mongodb.log
    --fork
  - until nc -z localhost 27017; do echo "waiting for mongodb ${MONGODB}"; sleep 1; done
  - bundle exec rake errbit:bootstrap

script:
  - bundle exec rspec
  - bundle exec rubocop

matrix:
  allow_failures:
    - rvm: 2.5

language: ruby

rvm:
  - 2.3
  - 2.4
  - 2.5

env:
  global:
    - COVERAGE=true JRUBY_OPTS=--debug
  matrix:
    - MONGODB=3.2.18
    - MONGODB=3.4.10
    # TODO: - MONGODB=3.6.1 - needs a newer version of the mongoid gem, it seems

sudo: false

cache: bundler

before_install:
  - gem update --system

before_script:
  - wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB}.tgz
  - tar xzf mongodb-linux-x86_64-${MONGODB}.tgz
  - ${PWD}/mongodb-linux-x86_64-${MONGODB}/bin/mongod --version
  - mkdir ${PWD}/mongodb-linux-x86_64-${MONGODB}/data
  - >
    ${PWD}/mongodb-linux-x86_64-${MONGODB}/bin/mongod
    --dbpath ${PWD}/mongodb-linux-x86_64-${MONGODB}/data
    --logpath ${PWD}/mongodb-linux-x86_64-${MONGODB}/mongodb.log
    --fork
  - until nc -z localhost 27017; do echo "waiting for mongodb ${MONGODB}"; sleep 1; done
  - bundle exec rake errbit:bootstrap

script:
  - bundle exec rspec
  - bundle exec rubocop

matrix:
  allow_failures:
    - rvm: 2.5

Remove mongodb 3.0 from tested versions - is EOL February 2018
Remove mongodb 3.0 from tested versions - is EOL February 2018

According to https://www.mongodb.com/support-policy
