dist: xenial
language: node_js
services:
  - mongodb
  - redis-server
sudo: false

# https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
addons:
  apt:
    sources:
      - mongodb-4.0-xenial

    packages:
      - mongodb-org-server

cache:
  directories:
    - node_modules

# git:
#   depth: 5

node_js:
  - "8"
  - "10"
  - "12"

env:
  - TEST_BROWSER=true
  - TEST_FOLDER="test/addon test/bin test/config test/common test/issue test/plugin test/seeds test/client" RECURSIVE=true
  - TEST_FOLDER=test/server RECURSIVE=true
  - TRAVIS_LINT_TEST=true

before_script:
  - Xvfb :99 & export DISPLAY=:99

script: ./test/travis.sh
