Skip to content

Commit

Permalink
fix(tavis): fix karma config for browserstack (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
nnixaa authored Jan 19, 2018
1 parent b97ee8f commit d5a4873
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
- SAUCE_USERNAME=nixa
- SAUCE_ACCESS_KEY=a922753805a4-7538-6644-c450-48fdf18c
- BROWSER_STACK_USERNAME=debac1
- BROWSER_STACK_ACCESS_KEY=V5ykpyxrTxXLSsRBmXpL
- BROWSER_STACK_KEY=V5ykpyxrTxXLSsRBmXpL
- BROWSER_PROVIDER_READY_FILE=/tmp/nebular/readyfile
- BROWSER_PROVIDER_ERROR_FILE=/tmp/nebular/errorfile
- LOGS_DIR=/tmp/nebular/logs
Expand All @@ -30,7 +30,6 @@ matrix:
allow_failures:
- env: "MODE=sauce_e2e"
- env: "MODE=sauce_unit_test"
- env: "MODE=browserstack_unit_test"

install:
- npm install
Expand Down
6 changes: 4 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ module.exports = function (config) {
BrowserstackChromeCI: {
base: 'BrowserStack',
browser: 'Chrome',
version: 'latest'
version: 'latest',
os: 'Windows',
os_version: '10'
}
},
browserConsoleLogOptions: {
Expand All @@ -70,7 +72,7 @@ module.exports = function (config) {
pollingTimeout: 20000,
video: false,
},
singleRun: false
singleRun: true
};

if (process.env['TRAVIS']) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/browserstack/config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = process.env.BROWSER_STACK_ACCESS_KEY.split('').reverse().join('');
module.exports = process.env.BROWSER_STACK_KEY.split('').reverse().join('');
4 changes: 2 additions & 2 deletions scripts/ci/browserstack/start-tunnel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TUNNEL_URL="https://www.browserstack.com/browserstack-local/${TUNNEL_FILE}"
TUNNEL_DIR="/tmp/browserstack-tunnel"
TUNNEL_LOG="${LOGS_DIR}/browserstack-tunnel.log"

BROWSER_STACK_ACCESS_KEY=`echo ${BROWSER_STACK_ACCESS_KEY} | rev`
BROWSER_STACK_KEY=`echo ${BROWSER_STACK_KEY} | rev`

# Cleanup and create the folder structure for the tunnel connector.
rm -rf ${TUNNEL_DIR} ${BROWSER_PROVIDER_READY_FILE}
Expand Down Expand Up @@ -63,7 +63,7 @@ function create_ready_file {
touch ${BROWSER_PROVIDER_READY_FILE}
}

browserstack-tunnel/BrowserStackLocal -k ${BROWSER_STACK_ACCESS_KEY} ${ARGS} 2>&1 >> ${TUNNEL_LOG} &
browserstack-tunnel/BrowserStackLocal -k ${BROWSER_STACK_KEY} ${ARGS} 2>&1 >> ${TUNNEL_LOG} &

# Wait for the tunnel to be ready and create the readyfile with the Browserstack PID
create_ready_file &

0 comments on commit d5a4873

Please sign in to comment.