From 41156cec7cfcc39d80bd366bec0c480dd9b80f11 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 21 Jul 2016 12:07:28 -0700 Subject: [PATCH] [Build] Normalize reporting for QA tasks https://developer.nasa.gov/ResourceProspector/warp/issues/191 --- gulpfile.js | 5 +++++ karma.conf.js | 6 +++--- package.json | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index fab0f056e0..ff994c6a2c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -42,6 +42,7 @@ var gulp = require('gulp'), main: 'main.js', dist: 'dist', assets: 'dist/assets', + reports: 'dist/reports', scss: ['./platform/**/*.scss', './example/**/*.scss'], scripts: [ 'main.js', 'platform/**/*.js', 'src/**/*.js' ], specs: [ 'platform/**/*Spec.js', 'src/**/*Spec.js' ], @@ -112,6 +113,10 @@ gulp.task('lint', function () { .pipe(jshint({ jasmine: true })); return merge(scriptLint, specLint) + .pipe(jshint.reporter('gulp-jshint-html-reporter', { + filename: paths.reports + '/lint/jshint-report.html', + createMissingFolders : true + })) .pipe(jshint.reporter('default')) .pipe(jshint.reporter('fail')); }); diff --git a/karma.conf.js b/karma.conf.js index 17889dfe43..e682ec6d86 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -81,7 +81,7 @@ module.exports = function(config) { coverageReporter: { dir: process.env.CIRCLE_ARTIFACTS ? process.env.CIRCLE_ARTIFACTS + '/coverage' : - "dist/coverage", + "dist/reports/coverage", check: { global: { lines: 80 @@ -91,13 +91,13 @@ module.exports = function(config) { // HTML test reporting. htmlReporter: { - outputDir: "target/tests", + outputDir: "dist/reports/tests", preserveDescribeNesting: true, foldAll: false }, junitReporter: { - outputDir: process.env.CIRCLE_TEST_REPORTS || 'target/junit' + outputDir: process.env.CIRCLE_TEST_REPORTS || 'dist/reports/junit' }, // Continuous Integration mode. diff --git a/package.json b/package.json index dadce1d35c..028d7310e1 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "gulp": "^3.9.0", "gulp-jscs": "^3.0.2", "gulp-jshint": "^2.0.0", + "gulp-jshint-html-reporter": "^0.1.3", "gulp-rename": "^1.2.2", "gulp-replace-task": "^0.11.0", "gulp-requirejs-optimize": "^0.3.1",