2016-04-29 00:50:03 +00: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 16:24:09 +00:00
|
|
|
echo 'travis_fold:start:test.unit.tools'
|
|
|
|
|
|
|
|
|
|
# Run unit tests in tools
|
2016-05-05 03:01:17 +00:00
|
|
|
node ./dist/tools/tsc-watch/ tools runCmdsOnly
|
2016-05-03 16:24:09 +00:00
|
|
|
|
2017-01-20 00:24:47 +00:00
|
|
|
cd tools/validate-commit-message
|
|
|
|
|
$(npm bin)/jasmine
|
|
|
|
|
cd -
|
|
|
|
|
|
2016-05-03 16:24:09 +00:00
|
|
|
echo 'travis_fold:end:test.unit.tools'
|
|
|
|
|
|
|
|
|
|
|
2016-05-02 05:54:19 +00:00
|
|
|
echo 'travis_fold:start:test.unit.node'
|
2016-04-29 00:50:03 +00:00
|
|
|
|
|
|
|
|
# Run unit tests in node
|
2016-05-05 03:01:17 +00:00
|
|
|
node ./dist/tools/tsc-watch/ node runCmdsOnly
|
2016-04-29 00:50:03 +00:00
|
|
|
|
2016-05-02 05:54:19 +00:00
|
|
|
echo 'travis_fold:end:test.unit.node'
|
2016-04-29 00:50:03 +00:00
|
|
|
|
|
|
|
|
|
2016-05-27 23:22:16 +00:00
|
|
|
echo 'travis_fold:start:test.unit.localChrome'
|
2016-04-29 00:50:03 +00:00
|
|
|
|
2016-06-15 13:58:57 +00: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 16:24:09 +00:00
|
|
|
|
2016-04-29 00:50:03 +00: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-06-21 17:35:42 +00:00
|
|
|
|
|
|
|
|
$(npm bin)/karma start ./modules/@angular/router/karma.conf.js --single-run --browsers=${KARMA_JS_BROWSERS}
|
|
|
|
|
|
2016-05-02 05:54:19 +00:00
|
|
|
echo 'travis_fold:end:test.unit.localChrome'
|
2016-04-29 00:50:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
echo 'travis_fold:end:test.js'
|