2016-04-28 20:50:03 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -ex -o pipefail
|
|
|
|
|
|
|
|
if [[ ${TRAVIS} && ${CI_MODE} != "js" ]]; then
|
|
|
|
exit 0;
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo 'travis_fold:start:test.js'
|
|
|
|
|
|
|
|
# Setup environment
|
|
|
|
cd `dirname $0`
|
|
|
|
source ./env.sh
|
|
|
|
cd ../..
|
|
|
|
|
|
|
|
|
2016-05-03 12:24:09 -04:00
|
|
|
echo 'travis_fold:start:test.unit.tools'
|
|
|
|
|
|
|
|
# Run unit tests in tools
|
2016-05-04 23:01:17 -04:00
|
|
|
node ./dist/tools/tsc-watch/ tools runCmdsOnly
|
2016-05-03 12:24:09 -04:00
|
|
|
|
|
|
|
echo 'travis_fold:end:test.unit.tools'
|
|
|
|
|
|
|
|
|
2016-05-02 01:54:19 -04:00
|
|
|
echo 'travis_fold:start:test.unit.node'
|
2016-04-28 20:50:03 -04:00
|
|
|
|
|
|
|
# Run unit tests in node
|
2016-05-04 23:01:17 -04:00
|
|
|
node ./dist/tools/tsc-watch/ node runCmdsOnly
|
2016-04-28 20:50:03 -04:00
|
|
|
|
2016-05-02 01:54:19 -04:00
|
|
|
echo 'travis_fold:end:test.unit.node'
|
2016-04-28 20:50:03 -04:00
|
|
|
|
|
|
|
|
2016-05-27 19:22:16 -04:00
|
|
|
echo 'travis_fold:start:test.unit.localChrome'
|
2016-04-28 20:50:03 -04:00
|
|
|
|
2016-06-15 09:58:57 -04:00
|
|
|
# rebuild to revert files in @angular/compiler/test
|
|
|
|
# TODO(tbosch): remove this and teach karma to serve the right files
|
|
|
|
node dist/tools/@angular/tsc-wrapped/src/main -p modules/tsconfig.json
|
2016-05-03 12:24:09 -04:00
|
|
|
|
2016-04-28 20:50:03 -04:00
|
|
|
# Run unit tests in local chrome
|
|
|
|
if [[ ${TRAVIS} ]]; then
|
|
|
|
sh -e /etc/init.d/xvfb start
|
|
|
|
fi
|
|
|
|
|
|
|
|
$(npm bin)/karma start ./karma-js.conf.js --single-run --browsers=${KARMA_JS_BROWSERS}
|
2016-05-02 01:54:19 -04:00
|
|
|
echo 'travis_fold:end:test.unit.localChrome'
|
2016-04-28 20:50:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
echo 'travis_fold:end:test.js'
|