Skip to content

Commit

Permalink
fix(travis): Need only one script command in travis.yml
Browse files Browse the repository at this point in the history
Otherwise the before_script stuff runs each time, which makes Sauce Labs
angry.

- Also fixed keepAlive options in the protractor runner so it fails the
  job when e2e tests fail
  • Loading branch information
c0bra committed Dec 23, 2013
1 parent 2362352 commit 2278c69
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ before_script:
- ./lib/sauce/sauce_connect_block.sh

script:
# - ./travis_build.sh
- grunt
- grunt test:ci
- grunt test:e2e:ci
- ./travis_build.sh

after_success:
- grunt release
Expand Down
6 changes: 3 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ module.exports = function(grunt) {
configFile: "./test/protractor.conf.js"
},
singlerun: {
keepAlive: false,
options: {
keepAlive: false,
args: {
seleniumPort: 4444,
baseUrl: 'http://localhost:9999',
Expand All @@ -148,8 +148,8 @@ module.exports = function(grunt) {
}
},
ci: {
keepAlive: false,
options: {
keepAlive: false,
args: {
seleniumPort: 4444,
baseUrl: 'http://localhost:9999',
Expand All @@ -160,8 +160,8 @@ module.exports = function(grunt) {
}
},
auto: {
keepAlive: true,
options: {
keepAlive: true,
args: {
seleniumPort: 4444,
baseUrl: 'http://localhost:9999',
Expand Down
27 changes: 16 additions & 11 deletions travis_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@

set -e

if [ $JOB = "unit" ]; then
grunt
grunt test:ci
grunt release
elif [ $JOB = "e2e" ]; then
# grunt clean build test:e2e --browsers=SL_Chrome
grunt
grunt test:e2e:ci
else
echo "Unknown job type. Please set JOB=unit or JOB=e2e."
fi
# NOTE: Travis build matrix won't let us run something after ALL matrix jobs succeed, so we have to run serially (below)
# if [ $JOB = "unit" ]; then
# grunt
# grunt test:ci
# grunt release
# elif [ $JOB = "e2e" ]; then
# # grunt clean build test:e2e --browsers=SL_Chrome
# grunt
# grunt test:e2e:ci
# else
# echo "Unknown job type. Please set JOB=unit or JOB=e2e."
# fi

grunt
grunt test:ci
grunt test:e2e:ci

0 comments on commit 2278c69

Please sign in to comment.