Skip to content

Commit

Permalink
chore: support up to latest Nodejs LTS
Browse files Browse the repository at this point in the history
  • Loading branch information
jtmalinowski committed Jul 16, 2021
1 parent fcd5b22 commit e69f2bb
Show file tree
Hide file tree
Showing 6 changed files with 1,848 additions and 686 deletions.
Empty file added .github/workflows/.gitkeep
Empty file.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Continuous Integration
on:
push:
branches:
- main
permissions: read-all

jobs:
unit-tests:
runs-on: ubuntu-latest
permissions: read-all
strategy:
fail-fast: true
matrix:
nodejs: ['8', '10', '12', '14']
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.nodejs }}
- run: npm ci
- name: Lint code
run: npm run lint
- name: Test
run: npm run test
- name: Unit test
run: npm run test:unit:ci
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

28 changes: 16 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ var plumber = require('gulp-plumber');
var browserify = require('browserify');
var source = require('vinyl-source-stream');

gulp.task('static', function () {
function lint() {
return gulp.src(['**/*.js', '!**/*protocol_buffers*.js'])
.pipe(excludeGitignore())
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
}

gulp.task('nsp', function (cb) {
exports.nsp = function (cb) {
nsp('package.json', cb);
});
};

gulp.task('pre-test', function () {
function preTest() {
return gulp.src('lib/**/*.js')
.pipe(istanbul({includeUntested: true}))
.pipe(istanbul.hookRequire());
});
}

gulp.task('test', ['pre-test'], function (cb) {
function test(cb) {
var mochaErr;

gulp.src('test/**/*.js')
Expand All @@ -40,9 +40,9 @@ gulp.task('test', ['pre-test'], function (cb) {
.on('end', function () {
cb(mochaErr);
});
});
}

gulp.task('browserify', function () {
exports.browserify = function () {
//todo : minify
return browserify('./lib/signalfx_browser.js', { standalone: 'signalfx.streamer' })
.exclude('bufferutil')
Expand All @@ -52,7 +52,11 @@ gulp.task('browserify', function () {
.bundle()
.pipe(source('signalfx.js'))
.pipe(gulp.dest('./build/'));
});
};

gulp.task('prepublish');
gulp.task('default', ['static', 'test']);
exports.static = lint;
exports.prepublish = function prepublish(cb) {
cb();
};
exports.test = gulp.series(preTest, test);
exports.default = gulp.series(lint, test);
Loading

0 comments on commit e69f2bb

Please sign in to comment.