language: node_js
node_js:
  - '8'

before_install:
  # Install latest Yarn version
  - curl -o- -L https://yarnpkg.com/install.sh | bash
  - export PATH="$HOME/.yarn/bin:$PATH"

before_script:
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter

script:
  - yarn tslint
  - yarn eslint
  - yarn prepublishOnly
  - yarn build
  - yarn tsc
  - yarn test:coverage
  - yarn test:e2e

after_success:
  - yarn add codecov --ignore-workspace-root-check
  - yarn codecov

  # See https://github.com/codeclimate/test-reporter/issues/263
  # prettier-ignore
  - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
      for f in packages/*; do
        if [ -d $f ]; then
          echo $f;
          ./cc-test-reporter format-coverage -t lcov -o coverage/coverage.${f//\//-}.json $f/coverage/lcov.info;
        fi
      done;
      ./cc-test-reporter sum-coverage -o coverage/coverage.total.json coverage/coverage.*.json;
      ./cc-test-reporter upload-coverage -i coverage/coverage.total.json;
    fi

language: node_js
node_js:
  - 8
  - 10

before_install:
  # Install latest Yarn version
  - curl -o- -L https://yarnpkg.com/install.sh | bash
  - export PATH="$HOME/.yarn/bin:$PATH"

before_script:
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter

script:
  - yarn tslint
  - yarn eslint
  - yarn prepublishOnly
  - yarn build
  - yarn tsc
  - yarn test:coverage
  - yarn test:e2e

after_success:
  - yarn add codecov --ignore-workspace-root-check
  - yarn codecov

  # See https://github.com/codeclimate/test-reporter/issues/263
  # prettier-ignore
  - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
      for f in packages/*; do
        if [ -d $f ]; then
          echo $f;
          ./cc-test-reporter format-coverage -t lcov -o coverage/coverage.${f//\//-}.json $f/coverage/lcov.info;
        fi
      done;
      ./cc-test-reporter sum-coverage -o coverage/coverage.total.json coverage/coverage.*.json;
      ./cc-test-reporter upload-coverage -i coverage/coverage.total.json;
    fi

Test with Node.js 8 and 10
Test with Node.js 8 and 10
