Skip to content

Commit 2278c69

Browse files
committed
fix(travis): Need only one script command in travis.yml
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
1 parent 2362352 commit 2278c69

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

.travis.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ before_script:
3939
- ./lib/sauce/sauce_connect_block.sh
4040

4141
script:
42-
# - ./travis_build.sh
43-
- grunt
44-
- grunt test:ci
45-
- grunt test:e2e:ci
42+
- ./travis_build.sh
4643

4744
after_success:
4845
- grunt release

Gruntfile.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ module.exports = function(grunt) {
138138
configFile: "./test/protractor.conf.js"
139139
},
140140
singlerun: {
141-
keepAlive: false,
142141
options: {
142+
keepAlive: false,
143143
args: {
144144
seleniumPort: 4444,
145145
baseUrl: 'http://localhost:9999',
@@ -148,8 +148,8 @@ module.exports = function(grunt) {
148148
}
149149
},
150150
ci: {
151-
keepAlive: false,
152151
options: {
152+
keepAlive: false,
153153
args: {
154154
seleniumPort: 4444,
155155
baseUrl: 'http://localhost:9999',
@@ -160,8 +160,8 @@ module.exports = function(grunt) {
160160
}
161161
},
162162
auto: {
163-
keepAlive: true,
164163
options: {
164+
keepAlive: true,
165165
args: {
166166
seleniumPort: 4444,
167167
baseUrl: 'http://localhost:9999',

travis_build.sh

+16-11
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@
22

33
set -e
44

5-
if [ $JOB = "unit" ]; then
6-
grunt
7-
grunt test:ci
8-
grunt release
9-
elif [ $JOB = "e2e" ]; then
10-
# grunt clean build test:e2e --browsers=SL_Chrome
11-
grunt
12-
grunt test:e2e:ci
13-
else
14-
echo "Unknown job type. Please set JOB=unit or JOB=e2e."
15-
fi
5+
# NOTE: Travis build matrix won't let us run something after ALL matrix jobs succeed, so we have to run serially (below)
6+
# if [ $JOB = "unit" ]; then
7+
# grunt
8+
# grunt test:ci
9+
# grunt release
10+
# elif [ $JOB = "e2e" ]; then
11+
# # grunt clean build test:e2e --browsers=SL_Chrome
12+
# grunt
13+
# grunt test:e2e:ci
14+
# else
15+
# echo "Unknown job type. Please set JOB=unit or JOB=e2e."
16+
# fi
17+
18+
grunt
19+
grunt test:ci
20+
grunt test:e2e:ci

0 commit comments

Comments
 (0)