mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-08-04 22:51:03 +02:00
feat(travis): start testing against Node.js 8 and other CI improvements (#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
This commit is contained in:
committed by
Liran Tal
parent
4321744a09
commit
482c38c287
16
.travis.yml
16
.travis.yml
@@ -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
|
||||
@@ -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
|
||||
|
||||
17
gulpfile.js
17
gulpfile.js
@@ -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 = [];
|
||||
@@ -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',
|
||||
|
||||
@@ -15,13 +15,14 @@
|
||||
"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",
|
||||
@@ -29,7 +30,7 @@
|
||||
"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": {
|
||||
|
||||
Reference in New Issue
Block a user