language: scala
sudo: false

scala:
  - 2.11.8
  - 2.12.1

jdk:
  - oraclejdk8

script:
  - sbt ++$TRAVIS_SCALA_VERSION test/test:fastOptJS test/test:fullOptJS
  - sbt ++$TRAVIS_SCALA_VERSION test
  - sbt ++$TRAVIS_SCALA_VERSION 'set scalaJSStage in ThisBuild := FullOptStage' test
  - bin/checkDevOnly $TRAVIS_SCALA_VERSION

# Use PhantomJS 2
# https://mediocre.com/forum/topics/phantomjs-2-and-travis-ci-we-beat-our-heads-against-a-wall-so-you-dont-have-to
install:
  - mkdir travis-phantomjs
  - wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O "$PWD"/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2
  - tar -xvf "$PWD"/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C "$PWD"/travis-phantomjs
  - export PATH="$PWD/travis-phantomjs:$PATH"

# Taken from https://github.com/typelevel/cats/blob/master/.travis.yml
cache:
  directories:
  - $HOME/.sbt/0.13/dependency
  - $HOME/.sbt/boot/scala*
  - $HOME/.sbt/launchers
  - $HOME/.ivy2/cache
before_cache:
  - find $HOME/.sbt -name "*.lock" -type f -delete
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete


language: scala
sudo: false

scala:
  - 2.11.8
  - 2.12.1

jdk:
  - oraclejdk8

install:
  - . $HOME/.nvm/nvm.sh
  - nvm install stable
  - nvm use stable
  - npm install
  - npm install jsdom source-map-support

env:
  global:
    JSENV=node

script:
  - sbt ++$TRAVIS_SCALA_VERSION test/test:fastOptJS test/test:fullOptJS
  - sbt ++$TRAVIS_SCALA_VERSION 'set parallelExecution in ThisBuild := false' test
  - sbt ++$TRAVIS_SCALA_VERSION 'set parallelExecution in ThisBuild := false' 'set scalaJSStage in ThisBuild := FullOptStage' test
  - bin/checkDevOnly $TRAVIS_SCALA_VERSION

# Taken from https://github.com/typelevel/cats/blob/master/.travis.yml
before_cache:
  - find $HOME/.sbt -name "*.lock" -type f -delete
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete
cache:
  directories:
    - $HOME/.sbt/0.13/dependency
    - $HOME/.sbt/boot/scala*
    - $HOME/.sbt/launchers
    - $HOME/.ivy2/cache


Use Node.js on Travis CI
Use Node.js on Travis CI
