## Customize the test machine
machine:
  pre:
    - mkdir ~/.yarn-cache

  node:
    version:
      4.3.2

## Customize dependencies
dependencies:
  pre:
    - curl -o- -L https://yarnpkg.com/install.sh | bash
    - nvm install 7.0.0
    # For some reason phantomjs-prebuild is failing w/yarn, but npm installing works
    - npm install phantomjs-prebuilt
    - git reset master

  cache_directories:
    - ~/.yarn-cache
  override:
    - yarn install

## Customize test commands
test:
  override:
    # Switch to 7 and lint
    - nvm use 7.0 && yarn lint:ci && yarn build && yarn test:node -- --maxWorkers=4:
        parallel: true
    - nvm use 7.0 && yarn test:web -- --maxWorkers=4 && yarn build:web -- --maxWorkers=4:
        parallel: true
    # Switch to check on 4.3.2
    - nvm use 4.3.2 && yarn build && yarn test:node -- --maxWorkers=4:
        parallel: true
