Permalink
Browse files
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 dhimil/karma@4c04011 This is not necessary with Socket.io 1.x.
- Loading branch information
Showing
with
118 additions
and 41 deletions.
- +7 −5 .travis.yml
- +10 −6 karma-shared.conf.js
- +4 −2 lib/browser-stack/start-tunnel.js
- +2 −0 lib/browser-stack/start-tunnel.sh
- +2 −2 package.json
- +73 −24 protractor-travis-conf.js
- +9 −2 scripts/travis/build.sh
- +11 −0 scripts/travis/start_browser_provider.sh
| @@ -1 +1,3 @@ | ||
| export BROWSER_STACK_ACCESS_KEY=`echo $BROWSER_STACK_ACCESS_KEY | rev` | ||
|
|
||
| node ./lib/browser-stack/start-tunnel.js & |
| @@ -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 |