2016-02-09 12:08:37 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2017-03-03 07:02:51 -06:00
|
|
|
# Enable tracing and Terminate the execution if anything fails in the pipeline.
|
|
|
|
|
set -xe
|
2016-08-03 01:26:56 +02:00
|
|
|
|
2017-01-06 17:13:42 +01:00
|
|
|
# Ensure that scripts will run from project dir.
|
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
|
|
2017-12-12 22:52:52 +00:00
|
|
|
if [[ -n "$RUN_LINT" ]]; then
|
|
|
|
|
npm run lint
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
|
2017-03-08 01:32:19 +02:00
|
|
|
# When Travis CI specifies an AngularJS version, try to install those for tests.
|
2017-01-06 13:58:37 +01:00
|
|
|
if [[ -n "$NG_VERSION" ]]; then
|
2017-01-06 17:13:42 +01:00
|
|
|
./scripts/fetch-angular-version.sh "$NG_VERSION"
|
2017-01-06 13:58:37 +01:00
|
|
|
fi
|
|
|
|
|
|
2016-02-09 12:08:37 -06:00
|
|
|
# Run our check to make sure all tests will actually run
|
|
|
|
|
gulp ddescribe-iit
|
|
|
|
|
gulp build
|
2016-07-26 22:33:23 +02:00
|
|
|
|
|
|
|
|
# Initialize our Sauce Connector
|
|
|
|
|
./scripts/sauce/setup-tunnel.sh;
|
|
|
|
|
|
|
|
|
|
# Wait for the tunnel to be ready
|
|
|
|
|
./scripts/sauce/wait-tunnel.sh
|
|
|
|
|
|
2017-03-03 09:03:27 -06:00
|
|
|
if [[ -n "$BROWSERS" ]]; then
|
|
|
|
|
gulp karma --config=config/karma-sauce.conf.js --browsers=$BROWSERS --reporters='dots'
|
|
|
|
|
else
|
|
|
|
|
gulp karma --config=config/karma-sauce.conf.js --reporters='dots'
|
|
|
|
|
fi
|
2016-07-26 22:33:23 +02:00
|
|
|
|
|
|
|
|
# Shutdown the tunnel
|
2017-03-03 07:02:51 -06:00
|
|
|
./scripts/sauce/stop-tunnel.sh
|