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
|
|
|
|
node ./dist/tools/tsc-watch/ tools triggerCmds
|
|
|
|
|
|
|
|
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-03 12:24:09 -04:00
|
|
|
node ./dist/tools/tsc-watch/ node triggerCmds
|
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-03 12:24:09 -04:00
|
|
|
echo 'travis_fold:start:test.compiler_cli.node'
|
2016-04-28 20:50:03 -04:00
|
|
|
|
2016-05-03 12:24:09 -04:00
|
|
|
# Run compiler_cli integration tests in node
|
|
|
|
node dist/tools/cjs-jasmine -- @angular/compiler_cli/integrationtest/**/*_spec.js
|
|
|
|
|
|
|
|
echo 'travis_fold:end:test.compiler_cli.node'
|
2016-04-28 20:50:03 -04:00
|
|
|
|
|
|
|
# rebuild since codegen has overwritten some files.
|
2016-05-03 12:24:09 -04:00
|
|
|
node dist/all/@angular/compiler_cli/src/main -p modules/tsconfig.json
|
|
|
|
|
|
|
|
echo 'travis_fold:start:test.unit.localChrome'
|
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'
|