dependencies:
  pre:
    - case $CIRCLE_NODE_INDEX in 0) NODE_VERSION=4 ;; 1) NODE_VERSION=4 ;; 2) NODE_VERSION=6 ;; 3) NODE_VERSION=6 ;; esac; nvm install $NODE_VERSION && nvm alias default $NODE_VERSION
    - npm install -g npm@4.x.x
    - sudo sysctl fs.inotify.max_user_watches=524288

  cache_directories:
    - ~/.meteor
    - ~/.electron
    - ~/.yarn-cache
    - tests/.__tmp_int

  override:
    - meteor || curl https://install.meteor.com/?release=1.4.2.7 | /bin/sh
    - npm install

test:
  override:
    - case $CIRCLE_NODE_INDEX in 0) TEST="normal" ;; 1) TEST="integration" ;; 2) TEST="normal" ;; 3) TEST="integration" ;; esac; if [[ "$TEST" == "normal" ]]; then npm run test; else npm run prepare-integration-tests && npm run test-integration; fi:
        parallel: true

dependencies:
  pre:
    - case $CIRCLE_NODE_INDEX in 0) NODE_VERSION=6 ;; 1) NODE_VERSION=6 ;; 2) NODE_VERSION=8 ;; 3) NODE_VERSION=8 ;; esac; nvm install $NODE_VERSION && nvm alias default $NODE_VERSION
    - npm install -g npm@5.x.x
    - sudo sysctl fs.inotify.max_user_watches=524288

  cache_directories:
    - ~/.meteor
    - ~/.electron
    - ~/.yarn-cache
    - tests/.__tmp_int

  override:
    - meteor || curl https://install.meteor.com/?release=1.4.2.7 | /bin/sh
    - npm install

test:
  override:
    - case $CIRCLE_NODE_INDEX in 0) TEST="normal" ;; 1) TEST="integration" ;; 2) TEST="normal" ;; 3) TEST="integration" ;; esac; if [[ "$TEST" == "normal" ]]; then npm run test; else npm run prepare-integration-tests && npm run test-integration; fi:
        parallel: true

Use node 6,8 and npm 5
Use node 6,8 and npm 5
