From 8858ebc4ab91009220300d1172dfb57b31b0a464 Mon Sep 17 00:00:00 2001 From: Marc Laval Date: Tue, 6 Sep 2016 21:07:48 +0200 Subject: [PATCH] ci: update SauceLabs badge when running CI on master (#11352) --- README.md | 3 ++- scripts/ci-lite/env.sh | 12 ++++++++++-- scripts/ci-lite/test_saucelabs.sh | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2880d47626..e9cd518875 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ [![npm version](https://badge.fury.io/js/%40angular%2Fcore.svg)](https://badge.fury.io/js/%40angular%2Fcore) [![Downloads](http://img.shields.io/npm/dm/angular2.svg)](https://npmjs.org/package/angular2) -[![Sauce Test Status](https://saucelabs.com/browser-matrix/angular2-ci.svg)](https://saucelabs.com/u/angular2-ci) +[![Sauce Test Status](https://saucelabs.com/browser-matrix/angular2-ci.svg)](https://saucelabs.com/u/angular2-ci) +*Safari (7+), iOS (7+), Edge (14) and IE mobile (11) are tested on [BrowserStack][https://www.browserstack.com/].* Angular ========= diff --git a/scripts/ci-lite/env.sh b/scripts/ci-lite/env.sh index e0164ce79e..fd57d09f91 100644 --- a/scripts/ci-lite/env.sh +++ b/scripts/ci-lite/env.sh @@ -59,8 +59,16 @@ if [[ ${TRAVIS} ]]; then export CXX=g++-4.8 # Used by karma and karma-chrome-launcher - export SAUCE_USERNAME=angular-ci - export SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987 + # In order to have a meaningful SauceLabs badge on the repo page, + # the angular2-ci account is used only when pushing commits to master; + # in all other cases, the regular angular-ci account is used. + if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ]; then + export SAUCE_USERNAME=angular2-ci + export SAUCE_ACCESS_KEY=693ebc16208a-0b5b-1614-8d66-a2662f4e + else + export SAUCE_USERNAME=angular-ci + export SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987 + fi export BROWSER_STACK_USERNAME=angularteam1 export BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB export CHROME_BIN=${HOME}/.chrome/chromium/chrome-linux/chrome diff --git a/scripts/ci-lite/test_saucelabs.sh b/scripts/ci-lite/test_saucelabs.sh index 2ad21821c3..59deb6b2d0 100755 --- a/scripts/ci-lite/test_saucelabs.sh +++ b/scripts/ci-lite/test_saucelabs.sh @@ -17,6 +17,6 @@ cd ../.. ./scripts/sauce/sauce_connect_block.sh SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev` -$(npm bin)/karma start ./karma-js.conf.js --single-run --browsers=${KARMA_JS_BROWSERS} +$(npm bin)/karma start ./karma-js.conf.js --single-run --browsers=${KARMA_JS_BROWSERS} --reporters internal-angular,saucelabs echo 'travis_fold:end:test_saucelabs'