File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 - SAUCE_ACCESS_KEY=72e4f85f-4e6b-4971-b8c5-f6707308f63e
1313 - SAUCE_USERNAME="mgiambalvo"
1414 - SAUCE_CONNECT_VERSION="4.4.0"
15+ - LOGS_DIR="/tmp/logs"
1516 matrix :
1617 - CI_MODE=local
1718 - CI_MODE=saucelabs
@@ -23,11 +24,10 @@ cache:
2324install :
2425 - cd tour-of-heroes
2526 - npm install
27+ - cd ..
2628
2729before_script :
2830 - ./scripts/travis_setup.sh
2931
3032script :
31- - npm run lint
32- - npm run test -- --watch=false
33- - npm run travis
33+ - ./scripts/travis_test.sh
Original file line number Diff line number Diff line change 1+ export SAUCE_ACCESS_KEY=" 72e4f85f-4e6b-4971-b8c5-f6707308f63e"
2+ export SAUCE_USERNAME=" mgiambalvo"
3+ export SAUCE_CONNECT_VERSION=" 4.4.0"
4+ export LOGS_DIR=" /tmp/logs"
Original file line number Diff line number Diff line change 11# Sets up the test environment on Travis.
22
3+ set -ex -o pipefail
4+ cd ` dirname $0 `
5+ source ./env.sh
6+
37# Start Xvfb when running locally.
48if [[ ${TRAVIS} && (${CI_MODE} == " local" ) ]]; then
59 /etc/init.d/xvfb start
610fi
711
812# Start SauceConnect when running on SauceLabs.
913if [[ ${TRAVIS} && (${CI_MODE} == " saucelabs" ) ]]; then
10- ./scripts/ sauce_connect_setup.sh
14+ ./sauce_connect_setup.sh
1115fi
Original file line number Diff line number Diff line change 11# Runs the Travis CI
22
3+ set -ex -o pipefail
4+ cd ` dirname $0 `
5+ source ./env.sh
6+ cd ../tour-of-heroes
37
8+ ng build
9+ npm run lint
10+ npm run test -- --watch=false
11+
12+ # When using saucelabs, use a different config.
13+ if [[ ${TRAVIS} && (${CI_MODE} == " saucelabs" ) ]]; then
14+ PROTRACTOR_CONFIG=" protractor-saucelabs.conf.js"
15+ fi
16+
17+ concurrently --success first --kill-others \" lite-server\" \" protractor $PROTRACTOR_CONFIG \"
Original file line number Diff line number Diff line change 88 "lint" : " tslint \" src/**/*.ts\" " ,
99 "test" : " ng test" ,
1010 "pree2e" : " webdriver-manager update" ,
11- "e2e" : " protractor" ,
12- "pretravis" : " ng build" ,
13- "travis" : " concurrently --success first --kill-others \" lite-server\" \" npm run e2e\" "
11+ "e2e" : " protractor"
1412 },
1513 "private" : true ,
1614 "dependencies" : {
Original file line number Diff line number Diff line change 1+ var defaultConfig = require ( './protractor.conf.js' ) . config ;
2+
3+ var ciConfig = {
4+ sauceUser : process . env . SAUCE_USERNAME ,
5+ sauceKey : process . env . SAUCE_ACCESS_KEY
6+ } ;
7+
8+ exports . config = Object . assign ( defaultConfig , ciConfig ) ;
9+ console . log ( exports . config ) ;
You can’t perform that action at this time.
0 commit comments