language: node_js
dist: trusty
node_js:
    - "4"
    - "6"

notifications:
  irc:
    channels:
      - "irc.freenode.org#wikimedia-services"
    on_success: change
    on_failure: always
addons:
  apt:
    packages:
    - oracle-java8-set-default

env:
  - CASSANDRA_VERSION=3.11.0 TEST_TARGET=all

before_install:
  - wget https://archive.apache.org/dist/cassandra/${CASSANDRA_VERSION}/apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz -P ../
  - tar -xzf ../apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz -C ../
  - export JAVA_HOME="/usr/lib/jvm/java-8-oracle" PATH=`pwd`/../apache-cassandra-${CASSANDRA_VERSION}/bin:$PATH
  - mkdir -p ../apache-cassandra-${CASSANDRA_VERSION}/logs
  - echo "-Xms256m" >> ../apache-cassandra-${CASSANDRA_VERSION}/conf/jvm.options
  - echo "-Xmx512m" >> ../apache-cassandra-${CASSANDRA_VERSION}/conf/jvm.options
  - bash -x ../apache-cassandra-${CASSANDRA_VERSION}/bin/cassandra

script: sh test/utils/run_tests.sh coverage ${TEST_TARGET} && (npm run-script coveralls || exit 0)

language: node_js
dist: trusty
node_js:
  - "6"
  - "8"

notifications:
  irc:
    channels:
      - "irc.freenode.org#wikimedia-services"
    on_success: change
    on_failure: always
addons:
  apt:
    packages:
    - oracle-java8-set-default

env:
  - CASSANDRA_VERSION=3.11.0 TEST_TARGET=all

before_install:
  - wget https://archive.apache.org/dist/cassandra/${CASSANDRA_VERSION}/apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz -P ../
  - tar -xzf ../apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz -C ../
  - export JAVA_HOME="/usr/lib/jvm/java-8-oracle" PATH=`pwd`/../apache-cassandra-${CASSANDRA_VERSION}/bin:$PATH
  - mkdir -p ../apache-cassandra-${CASSANDRA_VERSION}/logs
  - echo "-Xms256m" >> ../apache-cassandra-${CASSANDRA_VERSION}/conf/jvm.options
  - echo "-Xmx512m" >> ../apache-cassandra-${CASSANDRA_VERSION}/conf/jvm.options
  - bash -x ../apache-cassandra-${CASSANDRA_VERSION}/bin/cassandra

script: sh test/utils/run_tests.sh coverage ${TEST_TARGET} && (npm run-script coveralls || exit 0)

Drop Node v4, add Node v8
Travis: Drop Node v4, add Node v8
