Skip to content

Commit d386c4a

Browse files
committed
chore(travis): setting up travis to run e2e tests
1 parent 08787be commit d386c4a

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ before_script:
4141
script:
4242
- ./scripts/travis/travis_build.sh
4343

44-
# after_success:
44+
after_success:
45+
- grunt release
4546

4647
after_script:
4748
- ./travis_print_logs.sh

Gruntfile.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,16 @@ module.exports = function(grunt) {
137137
keepAlive: true,
138138
configFile: "./test/protractor.conf.js"
139139
},
140-
singlerun: {},
140+
singlerun: {
141+
keepAlive: false,
142+
options: {
143+
args: {
144+
seleniumPort: 4444,
145+
baseUrl: 'http://localhost:9999',
146+
specs: ['.tmp/doc-scenarios/**/*.spec.js', 'test/e2e/**/*.spec.js']
147+
}
148+
}
149+
},
141150
auto: {
142151
keepAlive: true,
143152
options: {
@@ -405,7 +414,7 @@ module.exports = function(grunt) {
405414
// grunt.registerTask('test:ci', ['clean', 'jshint', 'ngtemplates', 'karma:sauce']);
406415
grunt.registerTask('test:ci', ['clean', 'jshint', 'ngtemplates', 'serialsauce']);
407416
grunt.registerTask('test:docs', ['connect:testserver', 'protractor:docs']);
408-
grunt.registerTask('test:e2e', ['protractor:singlerun']);
417+
grunt.registerTask('test:e2e', ['connect:testserver', 'protractor:singlerun']);
409418

410419
// Test
411420
grunt.registerTask('test', 'Run tests on singleRun karma server', function() {

travis_build.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ set -e
55
if [ $JOB = "unit" ]; then
66
grunt
77
grunt test:ci
8-
grunt release
98
elif [ $JOB = "e2e" ]; then
109
# grunt clean build test:e2e --browsers=SL_Chrome
10+
grunt
11+
grunt test:e2e
1112
else
1213
echo "Unknown job type. Please set JOB=unit or JOB=e2e."
1314
fi

0 commit comments

Comments
 (0)