diff --git a/.travis.yml b/.travis.yml index d116041c71..7e0fd56691 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,11 @@ language: node_js sudo: false node_js: - - 4 - - 5 - - 6 - - 7 -matrix: - allow_failures: - - node_js: 7 + - '6.10' + - '7' +#matrix: +# allow_failures: +# - node_js: 7 os: - linux - centos @@ -30,8 +28,11 @@ addons: before_install: - npm i nsp -g - npm i snyk -g - - export DISPLAY=:99.0 - - bash scripts/setup-protractor.sh + - npm install protractor + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" + - 'node_modules/protractor/bin/webdriver-manager update --standalone --firefox' + - 'node_modules/protractor/bin/webdriver-manager start 2>&1 &' - sleep 3 #before_script: # - snyk auth $SNYK_TOKEN diff --git a/gulpfile.js b/gulpfile.js index 29b524dc90..5c51ee9bca 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -388,40 +388,13 @@ gulp.task('dropdb', function (done) { // Downloads the selenium webdriver if protractor version is compatible gulp.task('webdriver_update', webdriver_update); -gulp.task('webdriver_prep', function(done) { - runSequence('protractor_prep', 'webdriver_update', done); -}); - -gulp.task('protractor_prep', function() { - var nodeVersions = process.versions; - switch (nodeVersions.node.substr(0, 1)) { - case '4': - case '5': - console.log('E2E testing doesnt support v4 and v5'); - process.exit(0); - break; - case '6': - if (parseInt(nodeVersions.node.substr(1, 1), 10) < 9) { - console.log('E2E testing with latest protractor requires v >= 6.9 '); - process.exit(0); - } - break; - default: - console.log('Detecting support for protractor E2E tests'); - break; - } - - return gulp.src('*.js'); -}); - - // Start the standalone selenium server // NOTE: This is not needed if you reference the // seleniumServerJar in your protractor.conf.js gulp.task('webdriver_standalone', webdriver_standalone); // Protractor test runner task -gulp.task('protractor', ['webdriver_prep'], function () { +gulp.task('protractor', ['webdriver_update'], function () { gulp.src([]) .pipe(protractor({ configFile: 'protractor.conf.js' diff --git a/scripts/setup-protractor.sh b/scripts/setup-protractor.sh deleted file mode 100755 index 3d4aaf4e62..0000000000 --- a/scripts/setup-protractor.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -x - -echo "$TRAVIS_NODE_VERSION" -if [[ "$TRAVIS_NODE_VERSION" == "6" || "$TRAVIS_NODE_VERSION" == "7" ]] -then - npm install protractor - export DISPLAY=:99.0 - bash -e /etc/init.d/xvfb start - ./node_modules/protractor/bin/webdriver-manager update --standalone --firefox - ./node_modules/protractor/bin/webdriver-manager start 2>&1 & -fi