language: node_js matrix: include: - node_js: 6.14.0 - node_js: 8 - node_js: 10 env: TYPE_TEST=true - node_js: 6.14.0 env: SAUCE=true cache: directories: - node_modules script: - | echo "machine github.com login stellar-jenkins password $GITHUB_TOKEN" >~/.netrc git config --global user.name "Travis CI" git config --global user.email "travis@stellar.org" if [ "${SAUCE}" = "true" ]; then if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then gulp test:sauce else echo "Pull request - skip Sauce Labs testing..." fi else # Ugly but it's the only way to make istanbul generate coverage report yarn test # only run the type test on node >8.2.1, since some of the type libs have # trailing commas in function args if [ "${TYPE_TEST}" = "true" ]; then yarn dtslint fi fi after_success: - | # Send report to coveralls but only once if [ -z "${SAUCE}" ] && [ "${TRAVIS_NODE_VERSION}" = "8" ] && [ "${TRAVIS_BRANCH}" = "master" ]; then gulp submit-coverage fi notifications: slack: secure: CgXxNEQrQ82EatyF/wSdF0P5rXcWPL+fFZ1lb1aBb8RbVt5gwddJ6xWVD/nYSr6tIJvIYHYhoYsIDPENwezIPsesG7kWXerQhydsEcA34JKxzsStd/TmU6Moxuwy6KTN7yzmL6586nSvoAw9TNPgvRkJFkH07asjGIc9Rlaq7/Y= env: global: - secure: UfHc1SSKsUx8j2Z/S9WoJA+Qd9T9tWQZEGZVzmAmkGQ+V4iQsYwp2AwWJLH+e0JSKcVz9tiGicPfv8RlVS4YAQ2EeW2kC2W0ULrX4FYwNuuD/tjfHl47Vsoze4QlBuaZd897upt8r30GpUhqLonAkKr3700lZjr9Id3woWrSNfA= before_deploy: gulp build after_deploy: './after_deploy.sh' deploy: - provider: npm email: npm@stellar.org api_key: $NPM_TOKEN skip_cleanup: true on: tags: true repo: stellar/js-hc-base node: 8 - provider: script script: './bower_publish.sh' skip_cleanup: true on: tags: true repo: stellar/js-hc-base node: 8