sudo: required
services:
  - docker

language: rust
rust:
  - stable
  - beta
  - nightly

install:
  - sudo apt-get update
  - sudo apt-get install npm nodejs-legacy
  - sudo npm install -g elm

script:
  - cd server
  - cargo build --verbose
  - cargo test --verbose
  - cd ../client
  - elm package install -y
  - elm make Main.elm --output=mortgage.js
  - cd ..

after_success: |
  [ $TRAVIS_BRANCH = master ] &&
  [ $TRAVIS_PULL_REQUEST = false ] &&
  [ $TRAVIS_RUST_VERSION = stable ] &&
  docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASSWORD &&
  docker build -t mattthomson/mortgage . &&
  docker push mattthomson/mortgage

sudo: required
services:
  - docker

language: rust
rust:
  - stable
  - beta
  - nightly

install:
  - sudo apt-get update
  - sudo apt-get install -y npm nodejs-legacy
  - sudo npm install -g elm

script:
  - cd server
  - cargo build --verbose
  - cargo test --verbose
  - cd ../client
  - elm package install -y
  - elm make Main.elm --output=mortgage.js
  - cd ..

after_success: |
  [ $TRAVIS_BRANCH = master ] &&
  [ $TRAVIS_PULL_REQUEST = false ] &&
  [ $TRAVIS_RUST_VERSION = stable ] &&
  docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASSWORD &&
  docker build -t mattthomson/mortgage . &&
  docker push mattthomson/mortgage

Make sure apt-get doesn't prompt
Make sure apt-get doesn't prompt
