Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
feat(travis): start testing against Node.js 8 and other CI improvemen…
Browse files Browse the repository at this point in the history
…ts (#1785)

* Test against Node.js 8

Configure Travis CI test against Node.js 8 and allow failures.

Node.js 8 release notes: https://nodejs.org/en/blog/release/v8.0.0/

* Updates to TravisCI

* Refactor picking debug argument for different Node.js versions
  • Loading branch information
simison authored and lirantal committed Jun 13, 2017
1 parent 4321744 commit 482c38c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ sudo: false
node_js:
- '6.10'
- '7'
#matrix:
# allow_failures:
# - node_js: 7
- '8'
matrix:
fast_finish: true
allow_failures:
- node_js: '8'
os:
- linux
- centos
Expand All @@ -27,11 +29,11 @@ addons:
- gcc-4.8
- clang
before_install:
- npm i nsp -g
- npm i snyk -g
- npm install nsp -g
- npm install snyk -g
- npm install protractor
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- '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
Expand Down
17 changes: 4 additions & 13 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ var _ = require('lodash'),
webdriver_update = require('gulp-protractor').webdriver_update,
webdriver_standalone = require('gulp-protractor').webdriver_standalone,
del = require('del'),
KarmaServer = require('karma').Server;
KarmaServer = require('karma').Server,
semver = require('semver');

// Local settings
var changedTestFiles = [];
Expand All @@ -48,18 +49,8 @@ gulp.task('env:prod', function () {
// Nodemon task
gulp.task('nodemon', function () {

var nodeVersions = process.versions;
var debugArgument = '--debug';
switch (nodeVersions.node.substr(0, 1)) {
case '4':
case '5':
case '6':
debugArgument = '--debug';
break;
case '7':
debugArgument = '--inspect';
break;
}
// Node.js v7 and newer use different debug argument
var debugArgument = semver.satisfies(process.versions.node, '>=7.0.0') ? '--inspect' : '--debug';

return plugins.nodemon({
script: 'server.js',
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,22 @@
"npm": ">=3.10.8"
},
"scripts": {
"update": "npm update && npm prune && bower install --allow-root && bower prune --allow-root",
"update": "npm update && npm prune && npm run bower",
"clean": "rm -rf node_modules/ public/lib/",
"reinstall": "npm cache clean && npm run clean && npm install",
"start": "gulp",
"start:prod": "gulp prod",
"start:debug": "node-debug --web-host 0.0.0.0 server.js & gulp debug",
"gulp": "gulp",
"bower": "bower install --allow-root && bower prune --allow-root",
"lint": "gulp lint",
"test": "gulp test",
"test:server": "gulp test:server",
"test:server:watch": "gulp test:server:watch",
"test:client": "gulp test:client",
"test:e2e": "gulp test:e2e",
"test:coverage": "gulp test:coverage",
"postinstall": "bower install --allow-root && bower prune --allow-root",
"postinstall": "npm run bower",
"generate-ssl-certs": "scripts/generate-ssl-certs.sh"
},
"dependencies": {
Expand Down

0 comments on commit 482c38c

Please sign in to comment.