2016-04-28 20:50:03 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-03-02 03:22:24 -05:00
|
|
|
set -u -e -o pipefail
|
2016-04-28 20:50:03 -04:00
|
|
|
|
2017-03-02 03:22:24 -05:00
|
|
|
source ${TRAVIS_BUILD_DIR}/scripts/ci-lite/_travis_fold.sh
|
2016-04-28 20:50:03 -04:00
|
|
|
|
|
|
|
# Setup environment
|
|
|
|
cd `dirname $0`
|
|
|
|
source ./env.sh
|
|
|
|
cd ../..
|
|
|
|
|
|
|
|
mkdir -p ${LOGS_DIR}
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: install nvm?? it's already on travis so we don't need it
|
|
|
|
#curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
|
|
|
|
|
|
|
|
|
|
|
|
# Install node
|
|
|
|
#nvm install ${NODE_VERSION}
|
|
|
|
|
|
|
|
|
|
|
|
# Install version of npm that we are locked against
|
2017-03-02 03:22:24 -05:00
|
|
|
travisFoldStart "install-npm"
|
|
|
|
npm install -g npm@${NPM_VERSION}
|
|
|
|
travisFoldEnd "install-npm"
|
2016-04-28 20:50:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
# Install all npm dependencies according to shrinkwrap.json
|
2017-03-02 03:22:24 -05:00
|
|
|
travisFoldStart "npm-install"
|
|
|
|
node tools/npm/check-node-modules --purge || npm install
|
|
|
|
travisFoldEnd "npm-install"
|
2016-04-28 20:50:03 -04:00
|
|
|
|
|
|
|
|
2017-02-09 14:58:36 -05:00
|
|
|
if [[ ${TRAVIS} && (${CI_MODE} == "e2e" || ${CI_MODE} == "aio" || ${CI_MODE} == "docs_test") ]]; then
|
2017-02-09 12:08:16 -05:00
|
|
|
# Install version of yarn that we are locked against
|
2017-03-02 03:22:24 -05:00
|
|
|
travisFoldStart "install-yarn"
|
|
|
|
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version "${YARN_VERSION}"
|
|
|
|
travisFoldEnd "install-yarn"
|
2017-02-09 12:08:16 -05:00
|
|
|
fi
|
2017-01-25 12:39:01 -05:00
|
|
|
|
|
|
|
|
2017-02-09 16:05:04 -05:00
|
|
|
if [[ ${TRAVIS} && (${CI_MODE} == "aio" || ${CI_MODE} == "docs_test") ]]; then
|
2017-01-25 12:39:01 -05:00
|
|
|
# angular.io: Install all yarn dependencies according to angular.io/yarn.lock
|
2017-03-02 03:22:24 -05:00
|
|
|
travisFoldStart "yarn-install.aio"
|
|
|
|
cd "`dirname $0`/../../aio"
|
|
|
|
yarn install
|
|
|
|
cd -
|
|
|
|
travisFoldEnd "yarn-install.aio"
|
2017-01-25 12:39:01 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2016-04-28 20:50:03 -04:00
|
|
|
# Install Chromium
|
2017-01-25 12:39:01 -05:00
|
|
|
if [[ ${CI_MODE} == "js" || ${CI_MODE} == "e2e" || ${CI_MODE} == "aio" ]]; then
|
2017-03-02 03:22:24 -05:00
|
|
|
travisFoldStart "install-chromium"
|
|
|
|
./scripts/ci/install_chromium.sh
|
|
|
|
travisFoldEnd "install-chromium"
|
2016-04-28 20:50:03 -04:00
|
|
|
fi
|
2017-01-25 12:39:01 -05:00
|
|
|
|
2016-04-28 20:50:03 -04:00
|
|
|
|
|
|
|
# Install Sauce Connect
|
2016-05-09 19:47:26 -04:00
|
|
|
if [[ ${TRAVIS}] && (${CI_MODE} == "saucelabs_required" || ${CI_MODE} == "saucelabs_optional") ]]; then
|
2017-03-02 03:22:24 -05:00
|
|
|
travisFoldStart "install-sauceConnect"
|
|
|
|
./scripts/sauce/sauce_connect_setup.sh
|
|
|
|
travisFoldEnd "install-sauceConnect"
|
2016-04-28 20:50:03 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Install BrowserStack Tunnel
|
2016-05-09 19:47:26 -04:00
|
|
|
if [[ ${TRAVIS} && (${CI_MODE} == "browserstack_required" || ${CI_MODE} == "browserstack_optional") ]]; then
|
2017-03-02 03:22:24 -05:00
|
|
|
travisFoldStart "install-browserstack"
|
|
|
|
./scripts/browserstack/start_tunnel.sh
|
|
|
|
travisFoldEnd "install-browserstack"
|
2016-04-28 20:50:03 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2017-03-02 03:22:24 -05:00
|
|
|
# Install Selenium WebDriver
|
|
|
|
travisFoldStart "webdriver-manager-update"
|
|
|
|
$(npm bin)/webdriver-manager update
|
|
|
|
travisFoldEnd "webdriver-manager-update"
|
2016-04-28 20:50:03 -04:00
|
|
|
|
|
|
|
|
2017-03-02 03:22:24 -05:00
|
|
|
# Install bower packages
|
|
|
|
travisFoldStart "bower-install"
|
|
|
|
$(npm bin)/bower install
|
|
|
|
travisFoldEnd "bower-install"
|
|
|
|
|
|
|
|
|
|
|
|
# Print return arrows as a log separator
|
|
|
|
travisFoldReturnArrows
|