mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-28 12:55:48 +08:00
chore(travis): enable both SauceLabs and BrowserStack
Setting env var `BROWSER_PROVIDER` to `browserstack` or `saucelabs`
determines which browser provider will be used.
This does not affect the build as all jobs are set to use SauceLabs.
Switch to Karma with Socket.io 1.x, which solves some issues(*) with BS.
Thus removing `config.transports` as it is not used anymore
(Socket.io 1.x starts with polling and tries to upgrade if available).
(*) folks from BS were fiddling with socket.io configuration to get it stable.
See 4c04011850
This is not necessary with Socket.io 1.x.
This commit is contained in:
@@ -2,13 +2,20 @@
|
||||
|
||||
set -e
|
||||
|
||||
export BROWSER_STACK_ACCESS_KEY=`echo $BROWSER_STACK_ACCESS_KEY | rev`
|
||||
export SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`
|
||||
|
||||
if [ $JOB = "unit" ]; then
|
||||
if [ "$BROWSER_PROVIDER" == "browserstack" ]; then
|
||||
BROWSERS="BS_Chrome,BS_Safari,BS_Firefox,BS_IE_9,BS_IE_10,BS_IE_11"
|
||||
else
|
||||
BROWSERS="SL_Chrome,SL_Safari,SL_Firefox,SL_IE_9,SL_IE_10,SL_IE_11"
|
||||
fi
|
||||
|
||||
grunt test:promises-aplus
|
||||
grunt test:unit --browsers SL_Chrome,SL_Safari,SL_Firefox,SL_IE_9,SL_IE_10,SL_IE_11 --reporters dots
|
||||
grunt test:unit --browsers $BROWSERS --reporters dots
|
||||
grunt ci-checks
|
||||
grunt tests:docs --browsers SL_Chrome,SL_Safari,SL_Firefox,SL_IE_9,SL_IE_10,SL_IE_11 --reporters dots
|
||||
grunt tests:docs --browsers $BROWSERS --reporters dots
|
||||
grunt test:travis-protractor --specs "docs/app/e2e/**/*.scenario.js"
|
||||
elif [ $JOB = "e2e" ]; then
|
||||
if [ $TEST_TARGET = "jquery" ]; then
|
||||
|
||||
11
scripts/travis/start_browser_provider.sh
Executable file
11
scripts/travis/start_browser_provider.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
# Has to be run from project root directory.
|
||||
|
||||
# TODO(vojta): normalize paths to lib/$BROWSER_PROVIDER
|
||||
if [ "$BROWSER_PROVIDER" == "browserstack" ]; then
|
||||
echo "Using BrowserStack"
|
||||
./lib/browser-stack/start-tunnel.sh
|
||||
else
|
||||
echo "Using SauceLabs"
|
||||
./lib/sauce/sauce_connect_setup.sh
|
||||
fi
|
||||
Reference in New Issue
Block a user