Skip to content

Commit

Permalink
chore(travis): install grunt-cli globally to simplify scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed Nov 29, 2016
1 parent f54e924 commit 0990833
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scripts/check-size.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

node_modules/.bin/grunt minify
grunt minify
gzip -c < build/angular.min.js > build/angular.min.js.gzip
ls -l build/angular.min.*
4 changes: 3 additions & 1 deletion scripts/travis/before_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

yarn global add [email protected]

mkdir -p $LOGS_DIR

if [ $JOB != "ci-checks" ]; then
Expand All @@ -10,7 +12,7 @@ if [ $JOB != "ci-checks" ]; then
fi

if [ $JOB != "ci-checks" ]; then
node_modules/.bin/grunt package
grunt package
echo "wait_for_browser_provider"
./scripts/travis/wait_for_browser_provider.sh
fi
12 changes: 6 additions & 6 deletions scripts/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ export BROWSER_STACK_ACCESS_KEY=`echo $BROWSER_STACK_ACCESS_KEY | rev`
export SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`

if [ "$JOB" == "ci-checks" ]; then
node_modules/.bin/grunt ci-checks
grunt ci-checks
elif [ "$JOB" == "unit" ]; then
if [ "$BROWSER_PROVIDER" == "browserstack" ]; then
BROWSERS="BS_Chrome,BS_Safari,BS_Firefox,BS_IE_9,BS_IE_10,BS_IE_11,BS_iOS"
else
BROWSERS="SL_Chrome,SL_Firefox,SL_Safari_8,SL_Safari_9,SL_IE_9,SL_IE_10,SL_IE_11,SL_iOS"
fi

node_modules/.bin/grunt test:promises-aplus
node_modules/.bin/grunt test:unit --browsers="$BROWSERS" --reporters=dots
node_modules/.bin/grunt tests:docs --browsers="$BROWSERS" --reporters=dots
grunt test:promises-aplus
grunt test:unit --browsers="$BROWSERS" --reporters=dots
grunt tests:docs --browsers="$BROWSERS" --reporters=dots
elif [ "$JOB" == "docs-e2e" ]; then
node_modules/.bin/grunt test:travis-protractor --specs="docs/app/e2e/**/*.scenario.js"
grunt test:travis-protractor --specs="docs/app/e2e/**/*.scenario.js"
elif [ "$JOB" == "e2e" ]; then
if [[ $TEST_TARGET == jquery* ]]; then
export USE_JQUERY=1
Expand All @@ -30,7 +30,7 @@ elif [ "$JOB" == "e2e" ]; then
fi

export TARGET_SPECS="test/e2e/tests/**/*.js,$TARGET_SPECS"
node_modules/.bin/grunt test:travis-protractor --specs="$TARGET_SPECS"
grunt test:travis-protractor --specs="$TARGET_SPECS"
else
echo "Unknown job type. Please set JOB=ci-checks, JOB=unit or JOB=e2e-*."
fi

0 comments on commit 0990833

Please sign in to comment.