sudo: false

cache:
  directories:
    - tests/elm-stuff/build-artifacts

os:
  - osx
  - linux

env:
  matrix:
    - ELM_VERSION=0.18 TARGET_NODE_VERSION=node
    - ELM_VERSION=0.18 TARGET_NODE_VERSION=4.2

before_install:
  - if [ ${TRAVIS_OS_NAME} == "osx" ];
    then brew update; brew install nvm; mkdir ~/.nvm; export NVM_DIR=~/.nvm; source $(brew --prefix nvm)/nvm.sh;
    fi

install:
  - nvm install $TARGET_NODE_VERSION
  - nvm use $TARGET_NODE_VERSION
  - node --version
  - npm --version
  - npm install -g elm@$ELM_VERSION
  - npm install -g elm-test@beta


script:
  - elm-test
