File tree Expand file tree Collapse file tree 10 files changed +75
-4
lines changed
Expand file tree Collapse file tree 10 files changed +75
-4
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,19 @@ language: node_js
22node_js :
33 - 0.8
44
5+ env :
6+ global :
7+ - SAUCE_USERNAME=angular-ci
8+ - SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
9+ - SAUCE_CONNECT_READY_FILE=/tmp/sauce-connect-ready
10+
511before_script :
6- - export DISPLAY=:99.0
7- - sh -e /etc/init.d/xvfb start
12+ - export SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`
13+ - ./lib/sauce/sauce_connect_setup.sh
814 - npm install -g grunt-cli
915 - grunt package
1016 - grunt webserver > /dev/null &
17+ - ./lib/sauce/sauce_connect_block.sh
1118
1219script :
13- - grunt test --browsers Firefox --reporters=dots
20+ - grunt test --reporters dots --browsers SL_Chrome
Original file line number Diff line number Diff line change @@ -33,4 +33,6 @@ module.exports = function(config) {
3333 suite : 'Docs'
3434 }
3535 } ) ;
36+
37+ config . sauceLabs . testName = 'AngularJS: docs' ;
3638} ;
Original file line number Diff line number Diff line change @@ -22,4 +22,6 @@ module.exports = function(config) {
2222 suite : 'E2E'
2323 }
2424 } ) ;
25+
26+ config . sauceLabs . testName = 'AngularJS: e2e' ;
2527} ;
Original file line number Diff line number Diff line change @@ -13,4 +13,6 @@ module.exports = function(config) {
1313 suite : 'jqLite'
1414 }
1515 } ) ;
16+
17+ config . sauceLabs . testName = 'AngularJS: jqLite' ;
1618} ;
Original file line number Diff line number Diff line change @@ -13,4 +13,6 @@ module.exports = function(config) {
1313 suite : 'jQuery'
1414 }
1515 } ) ;
16+
17+ config . sauceLabs . testName = 'AngularJS: jQuery' ;
1618} ;
Original file line number Diff line number Diff line change @@ -12,4 +12,6 @@ module.exports = function(config) {
1212 suite : 'modules'
1313 }
1414 } ) ;
15+
16+ config . sauceLabs . testName = 'AngularJS: modules' ;
1517} ;
Original file line number Diff line number Diff line change @@ -4,6 +4,20 @@ module.exports = function(config) {
44 autoWatch : true ,
55 logLevel : config . LOG_INFO ,
66 logColors : true ,
7- browsers : [ 'Chrome' ]
7+ browsers : [ 'Chrome' ] ,
8+
9+ // config for Travis CI
10+ sauceLabs : {
11+ testName : 'AngularJS' ,
12+ startConnect : false ,
13+ tunnelIdentifier : process . env . TRAVIS_JOB_NUMBER
14+ } ,
15+
16+ customLaunchers : {
17+ 'SL_Chrome' : {
18+ base : 'SauceLabs' ,
19+ browserName : 'chrome'
20+ }
21+ }
822 } ) ;
923} ;
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+
4+ # Wait for Connect to be ready before exiting
5+ while [ ! -f $SAUCE_CONNECT_READY_FILE ]; do
6+ sleep .5
7+ done
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ # Setup and start Sauce Connect for your TravisCI build
6+ # This script requires your .travis.yml to include the following two private env variables:
7+ # SAUCE_USERNAME
8+ # SAUCE_ACCESS_KEY
9+ # Follow the steps at https://saucelabs.com/opensource/travis to set that up.
10+ #
11+ # Curl and run this script as part of your .travis.yml before_script section:
12+ # before_script:
13+ # - curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash
14+
15+ CONNECT_URL=" http://saucelabs.com/downloads/Sauce-Connect-latest.zip"
16+ CONNECT_DIR=" /tmp/sauce-connect-$RANDOM "
17+ CONNECT_DOWNLOAD=" Sauce_Connect.zip"
18+ CONNECT_LOG=" $CONNECT_DIR /log"
19+
20+ # Get Connect and start it
21+ mkdir -p $CONNECT_DIR
22+ cd $CONNECT_DIR
23+ curl $CONNECT_URL > $CONNECT_DOWNLOAD 2> /dev/null
24+ unzip $CONNECT_DOWNLOAD
25+ rm $CONNECT_DOWNLOAD
26+
27+
28+ echo " Starting Sauce Connect in the background"
29+ echo " Logging into $CONNECT_LOG "
30+ java -jar Sauce-Connect.jar --readyfile $SAUCE_CONNECT_READY_FILE \
31+ --tunnel-identifier $TRAVIS_JOB_NUMBER \
32+ $SAUCE_USERNAME $SAUCE_ACCESS_KEY > $CONNECT_LOG &
Original file line number Diff line number Diff line change 2222 "karma-firefox-launcher" : " ~0.0.1" ,
2323 "karma-ng-scenario" : " ~0.0.1" ,
2424 "karma-junit-reporter" : " ~0.0.1" ,
25+ "karma-sauce-launcher" : " ~0.0.4" ,
2526 "yaml-js" : " 0.0.5" ,
2627 "showdown" : " 0.3.1" ,
2728 "rewire" : " 1.1.3" ,
You can’t perform that action at this time.
0 commit comments