sudo: false
language: node_js
node_js: 
  - '0.12'
  - '4.4'
before_install:
# Get installer script.
  - cd bin
  - wget https://github.com/nodeGame/nodegame/raw/master/bin/install-nodegame-for-module.sh
  - chmod a+x install-nodegame-for-module.sh
  - cd ..
# Make dependencies available for Ultimatum.
  - mkdir nodegame
  - ln -s nodegame/node_modules .
install:
# Get nodegame.
  - ./bin/install-nodegame-for-module.sh -n "smoosh ya-csv"
# Install dependencies.
  - npm install
# Register this Ultimatum game in nodegame.
  - ln -s ../.. nodegame/games/ultimatum
script:
# Run autoplay-game to get memory dump.
  - cd nodegame
  - node test/launcher-autoplay.js ultimatum
  - cd ..
# Run tests on dump.
  - npm test
