feat(build): updating supported Node.js versions for CI (#1768)

This commit is contained in:
Liran Tal
2017-06-10 23:25:02 +03:00
committed by GitHub
parent 68c96066c2
commit 7b91f76fd3
3 changed files with 11 additions and 48 deletions

View File

@@ -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

View File

@@ -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'

View File

@@ -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