mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-12 22:35:30 +08:00
Currently there is only a minimal test spec in place. But this will now be run as part of the test tasks.
44 lines
1.1 KiB
Bash
Executable File
44 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "#################################"
|
|
echo "#### Jenkins Build ############"
|
|
echo "#################################"
|
|
|
|
# Enable tracing and exit on first failure
|
|
set -xe
|
|
|
|
# Define reasonable set of browsers in case we are running manually from commandline
|
|
if [[ -z "$BROWSERS" ]]
|
|
then
|
|
BROWSERS="Chrome,Firefox,Opera,/Users/jenkins/bin/safari.sh,/Users/jenkins/bin/ie8.sh,/Users/jenkins/bin/ie9.sh"
|
|
fi
|
|
|
|
# CLEAN #
|
|
rm -f angular.min.js.gzip.size
|
|
rm -f angular.js.size
|
|
|
|
|
|
# BUILD #
|
|
npm install --color false
|
|
grunt ci-checks package --no-color
|
|
|
|
mkdir -p test_out
|
|
|
|
# UNIT TESTS #
|
|
grunt test:unit --browsers $BROWSERS --reporters=dots,junit --no-colors --no-color
|
|
|
|
# END TO END TESTS #
|
|
grunt test:ci-protractor
|
|
|
|
# DOCS APP TESTS #
|
|
grunt test:docs --browsers $BROWSERS --reporters=dots,junit --no-colors --no-color
|
|
|
|
# Promises/A+ TESTS #
|
|
grunt test:promises-aplus --no-color
|
|
|
|
|
|
# CHECK SIZE #
|
|
gzip -c < build/angular.min.js > build/angular.min.js.gzip
|
|
echo "YVALUE=`ls -l build/angular.min.js | cut -d" " -f 8`" > angular.min.js.size
|
|
echo "YVALUE=`ls -l build/angular.min.js.gzip | cut -d" " -f 8`" > angular.min.js.gzip.size
|