sudo: false
language: node_js
node_js:
  - "9"
  - "8"
  - "6"

env:
  - JOB=test

matrix:
  fast_finish: true
  include:
    - node_js: "lts/*"
      env: JOB=lint

before_install:
  - yarn global add greenkeeper-lockfile@1

before_script:
  - greenkeeper-lockfile-update
  - 'if [ "$JOB" = "test" ]; then BABEL_ENV=test yarn run build; fi'

script:
  - 'if [ "$JOB" = "test" ]; then yarn run test-only; fi'
  - 'if [ "$JOB" = "lint" ]; then yarn run lint; fi'

after_script:
  - greenkeeper-lockfile-upload

after_success:
  - bash <(curl -s https://codecov.io/bash) -f coverage/coverage-final.json
