mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-02-28 01:00:59 +01:00
feat(build): updating supported Node.js versions for CI (#1768)
This commit is contained in:
19
.travis.yml
19
.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
|
||||
|
||||
29
gulpfile.js
29
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'
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user