language: node_js
node_js: node
# don't connect to sauce labs unless running functional tests
# before_install: if [ "${TRAVIS_MODE}" != "funcTests" ]; then unset SAUCE_USERNAME && unset SAUCE_ACCESS_KEY; fi
script: ./scripts/travis.sh
after_script: if [ "${TRAVIS_MODE}" = "funcTests" ]; then echo -n "travis_fold:start:sauce_logs\nSauce connect log:\n" && cat /home/travis/sauce-connect.log && echo -n "\ntravis_fold:end:sauce_logs\n"; fi
after_success: npm run coverage
env:
  global:
    - SAUCE_USERNAME=mangui
  matrix:
    - TRAVIS_MODE=build
    - TRAVIS_MODE=unitTests
    - TRAVIS_MODE=funcTests UA=chrome              OS="Windows 10"
    - TRAVIS_MODE=funcTests UA=firefox             OS="Windows 10"
    - TRAVIS_MODE=funcTests UA=chrome              OS="Windows 7"
    - TRAVIS_MODE=funcTests UA=firefox             OS="Windows 7"
    # - TRAVIS_MODE=funcTests UA=MicrosoftEdge       OS="Windows 10"
    # - TRAVIS_MODE=funcTests UA="internet explorer" OS="Windows 8.1"  UA_VERSION="11.0"
    - TRAVIS_MODE=funcTests UA="internet explorer" OS="Windows 10"
    - TRAVIS_MODE=funcTests UA=chrome              OS="OS X 10.11"
    # - TRAVIS_MODE=funcTests UA=firefox             OS="OS X 10.11"
    - TRAVIS_MODE=funcTests UA=safari              OS="OS X 10.11" UA_VERSION="9.0"

addons:
  sauce_connect: true
  jwt:
    secure: TxJT041jqRf4raCwtNJRb0rz2gGvEaADZjWO41UQND2+YIZ//S9qB2C4YyrL1BBsn8/ebdHr0cd18PwCzoBSEmoCdoAWXmqBaaLvM1DOeQkKJbU3+pFmWtv1qGqRXJLEAysNvzhG0sLdvBc0M7a/CWxqRfx1O3lGhLnTlAW33LlQndjJ8vh3SGQm8HxFR1503ujPd7V1jGwduVwaQp4zbAKTnQ4MLugmJf6UKiTc+YILMrVWOwipOIyYHh2GqbChd/v1PXff26XCNJXcaRZKJ8JosWyBpq5t4zlPO0qDfHpqbEuYK44xm4vzbZS94P/KF8BYzdtxQYLrxoS1UlnUYU7RmzqgL3y3AM7nzX/cXvJcoNXfUK2BpsB754XNyQfRmXOdRiHoC8+wwPqGkH/KCrmS4UIOqv4THfmDbrtewfcDTgKOzHxGcT1IsUq9BTxMNtxSwpHTHUXTXrzpS/UBDvrlc+9qPTqf+e6QL1aG+JT5sOg5REm2hMy0j18/Kr+HLXkehxEgJ6JrybyHUkkJrfcuWgVDu7Lv3cxlrtSMXi7TIwSB75NMoM8AE71GEVjXwpOw/0giwnmGsJNNi01ztod0UFe2V2rS+yPI1WNZIJ7Fw66U0oOKJ1rb4Iksl86n5Y2snHsxK8q5jhKaAaiWgGK5kVTAgF89t/GXYyNH6cI=
