---
language: node_js
node_js:
- '4'
- '5'
- '6'
install: true
env:
- TEST=.
- TEST=scripts/babel-relay-plugin
- TYPECHECK=.
- TYPECHECK=scripts/babel-relay-plugin
script:
- |
    if [ $TEST ]; then
      cd $TEST && npm install && npm run jest -- --runInBand --no-watchman
    fi
- |
    if [ $TYPECHECK ]; then
      cd $TYPECHECK && npm install && npm run typecheck
    fi

---
language: node_js
node_js:
- '4'
- '5'
- '6'
install: true
env:
- BUILD_EXAMPLE=examples/relay-treasurehunt
- BUILD_EXAMPLE=examples/star-wars
- BUILD_EXAMPLE=examples/todo
- BUILD_EXAMPLE=examples/TodoMVC
- TEST=.
- TEST=scripts/babel-relay-plugin
- TYPECHECK=.
- TYPECHECK=scripts/babel-relay-plugin
matrix:
  allow_failures:
  - env: BUILD_EXAMPLE=examples/relay-treasurehunt
  - env: BUILD_EXAMPLE=examples/star-wars
  - env: BUILD_EXAMPLE=examples/todo
  - env: BUILD_EXAMPLE=examples/TodoMVC
script:
- |
    if [ $BUILD_EXAMPLE ]; then
      cd $BUILD_EXAMPLE && npm install && npm run update-schema
    fi
- |
    if [ $TEST ]; then
      cd $TEST && npm install && npm run jest -- --runInBand --no-watchman
    fi
- |
    if [ $TYPECHECK ]; then
      cd $TYPECHECK && npm install && npm run typecheck
    fi

Test building the example apps in Travis
Test building the example apps in Travis

Summary:
Closes #1180.
Closes https://github.com/facebook/relay/pull/1181

Reviewed By: wincent

Differential Revision: D3366138

Pulled By: steveluscher

fbshipit-source-id: d29ed9e9ac0dddd6801d9786be68cc3678e7adfb
