# Travis CI config
# http://docs.travis-ci.com/user/languages/javascript-with-nodejs/
# https://docs.travis-ci.com/user/customizing-the-build/
# https://docs.travis-ci.com/user/migrating-from-legacy/

dist: trusty
sudo: required  # Required for headless Chrome
language: node_js

addons:
  firefox: latest
  chrome: stable

matrix:
  include:
    # Node 10 + Browser tests
    - node_js: 10
      env: KARMA=true

    # Node 8 + SauceLabs tests
    - node_js: 8
      env: KARMA=true SAUCE=true

    # Node 6 tests
    - node_js: 6

before_script:
  # Setup a virtual display for browser testing
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start

script: npm run lint && npm run test:typescript && npm run coverage

after_success:
  # concatenate all code-coverage data into a single file
  - ls -R1 coverage/*/lcov.info
  - cat coverage/*/lcov.info > ./coverage/lcov.info

  # send code-coverage data to Codacy
  - cat ./coverage/lcov.info | node_modules/.bin/codacy-coverage -p .

  # send code-coverage data to Coveralls
  - cat ./coverage/lcov.info | node_modules/coveralls/bin/coveralls.js

# Travis CI config
# http://docs.travis-ci.com/user/languages/javascript-with-nodejs/
# https://docs.travis-ci.com/user/customizing-the-build/
# https://docs.travis-ci.com/user/migrating-from-legacy/

dist: trusty
sudo: required  # Required for headless Chrome
language: node_js

addons:
  firefox: latest
  chrome: stable

matrix:
  include:
    # Node 10 + Browser tests
    - node_js: 10
      env: KARMA=true

    # Node 8 + SauceLabs tests
    - node_js: 8
      env: KARMA=true SAUCE=true

    # Node 6 tests
    - node_js: 6

before_script:
  # Setup a virtual display for browser testing
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start

script: npm run lint && npm run test:typescript && npm run coverage

after_success:
  # concatenate all code-coverage data into a single file
  - ls -Rlh coverage/*/lcov.info
  - cat coverage/*/lcov.info > ./coverage/lcov.info

  # send code-coverage data to Codacy
  - cat ./coverage/lcov.info | node_modules/.bin/codacy-coverage -p .

  # send code-coverage data to Coveralls
  - cat ./coverage/lcov.info | node_modules/coveralls/bin/coveralls.js

Improve the logging of code coverage info
Improve the logging of code coverage info
