mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-11-11 15:51:06 +00:00
Add codeclimate coverage
This commit is contained in:
parent
6625446b01
commit
362b48c411
@ -16,3 +16,8 @@ install:
|
|||||||
- npm run dev-up
|
- npm run dev-up
|
||||||
script:
|
script:
|
||||||
- npm run ci
|
- npm run ci
|
||||||
|
after_script:
|
||||||
|
- codeclimate-test-reporter < ./coverage/lcov.info
|
||||||
|
addons:
|
||||||
|
code_climate:
|
||||||
|
repo_token: 8b6e0e15aa138f7e5e03d04154d43b59c0cc0a565941229fd76d5fbfd8031155
|
||||||
|
@ -7,6 +7,7 @@ import runSequence from 'run-sequence';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import eslint from 'gulp-eslint';
|
import eslint from 'gulp-eslint';
|
||||||
import mocha from 'gulp-mocha';
|
import mocha from 'gulp-mocha';
|
||||||
|
import istanbul from 'gulp-istanbul';
|
||||||
import shellJs from 'shelljs';
|
import shellJs from 'shelljs';
|
||||||
|
|
||||||
const PATHS = setUpPaths();
|
const PATHS = setUpPaths();
|
||||||
@ -105,8 +106,17 @@ gulp.task('test', callback => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('mocha', ['build'], () => {
|
gulp.task('mocha', ['build'], () => {
|
||||||
return gulp.src(PATHS.TEST_DEST_JS, {read: false})
|
return gulp.src(PATHS.CLI_DEST_JS)
|
||||||
.pipe(mocha());
|
.pipe(istanbul({includeUntested: true}))
|
||||||
|
.on('finish', () => {
|
||||||
|
return gulp.src(PATHS.TEST_DEST_JS, {read: false})
|
||||||
|
.pipe(mocha())
|
||||||
|
.pipe(istanbul.writeReports({
|
||||||
|
dir: './coverage',
|
||||||
|
reporters: ['lcov'],
|
||||||
|
reportOpts: {dir: './coverage'}
|
||||||
|
}));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('ci', callback => {
|
gulp.task('ci', callback => {
|
||||||
@ -130,6 +140,7 @@ function setUpPaths() {
|
|||||||
paths.APP_STATIC_JS = path.join(paths.APP_SRC, 'static') + '/**/*.js';
|
paths.APP_STATIC_JS = path.join(paths.APP_SRC, 'static') + '/**/*.js';
|
||||||
paths.APP_STATIC_DEST = path.join(paths.APP_DEST, 'static');
|
paths.APP_STATIC_DEST = path.join(paths.APP_DEST, 'static');
|
||||||
paths.CLI_SRC_JS = paths.CLI_SRC + '/**/*.js';
|
paths.CLI_SRC_JS = paths.CLI_SRC + '/**/*.js';
|
||||||
|
paths.CLI_DEST_JS = paths.CLI_DEST + '/**/*.js';
|
||||||
paths.TEST_SRC_JS = paths.TEST_SRC + '/**/*.js';
|
paths.TEST_SRC_JS = paths.TEST_SRC + '/**/*.js';
|
||||||
paths.TEST_DEST_JS = paths.TEST_DEST + '/**/*.js';
|
paths.TEST_DEST_JS = paths.TEST_DEST + '/**/*.js';
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
"gulp": "^3.9.0",
|
"gulp": "^3.9.0",
|
||||||
"gulp-babel": "^6.1.1",
|
"gulp-babel": "^6.1.1",
|
||||||
"gulp-eslint": "^1.1.1",
|
"gulp-eslint": "^1.1.1",
|
||||||
|
"gulp-istanbul": "^0.10.3",
|
||||||
"gulp-mocha": "^2.2.0",
|
"gulp-mocha": "^2.2.0",
|
||||||
"gulp-sourcemaps": "^1.6.0",
|
"gulp-sourcemaps": "^1.6.0",
|
||||||
"lodash": "^4.0.0",
|
"lodash": "^4.0.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user