language: node_js

node_js:
  - "4"
  - "4.1"
  - "4.2"
  - "5"
  - "6"
  - "7"
  - "8"
  - "9"
  - "lts/*"
  - "node"

services:
  - mongodb

before_script:
  - 'if [ "$MONGOOSE_VERSION" ]; then npm install mongoose@^$MONGOOSE_VERSION; fi'

env:
  - MONGOOSE_VERSION=4.0
  - MONGOOSE_VERSION=4.1
  - MONGOOSE_VERSION=5
