diff --git a/.travis.yml b/.travis.yml index f1c5fb001c99..7a5a5af9a80c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ script: - yarn type-check - yarn closure - yarn diff:sample-json - - yarn smoke + - yarn smoke:silentcoverage - yarn test-extension # _JAVA_OPTIONS is breaking parsing of compiler output. See #3338. - unset _JAVA_OPTIONS @@ -49,5 +49,6 @@ before_cache: - rm -rf ./node_modules/temp-devtoolsprotocol/ after_success: - yarn coveralls + - yarn codecov addons: chrome: stable diff --git a/lighthouse-core/gather/gatherers/dobetterweb/js-libraries.js b/lighthouse-core/gather/gatherers/dobetterweb/js-libraries.js index 199322ea8ffd..3201a36cd0d6 100644 --- a/lighthouse-core/gather/gatherers/dobetterweb/js-libraries.js +++ b/lighthouse-core/gather/gatherers/dobetterweb/js-libraries.js @@ -22,8 +22,8 @@ const libDetectorSource = fs.readFileSync( * Obtains a list of detected JS libraries and their versions. * @return {!Array} */ -/* istanbul ignore next */ /* eslint-disable camelcase */ +/* istanbul ignore next */ function detectLibraries() { const libraries = []; diff --git a/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js b/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js index 5473b415d058..ca5dbe03d56d 100644 --- a/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +++ b/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js @@ -23,6 +23,7 @@ const Gatherer = require('../gatherer'); /* global document,window,HTMLLinkElement */ +/* istanbul ignore next */ function installMediaListener() { window.___linkMediaChanges = []; Object.defineProperty(HTMLLinkElement.prototype, 'media', { diff --git a/lighthouse-core/gather/gatherers/seo/robots-txt.js b/lighthouse-core/gather/gatherers/seo/robots-txt.js index 031962a1b46b..8832248ccd2d 100644 --- a/lighthouse-core/gather/gatherers/seo/robots-txt.js +++ b/lighthouse-core/gather/gatherers/seo/robots-txt.js @@ -9,6 +9,7 @@ const Gatherer = require('../gatherer'); /* global fetch, URL, location */ +/* istanbul ignore next */ function getRobotsTxtContent() { return fetch(new URL('/robots.txt', location.href)) .then(response => { diff --git a/lighthouse-core/lib/dom-helpers.js b/lighthouse-core/lib/dom-helpers.js index e28b748c7410..7f6f457976b0 100644 --- a/lighthouse-core/lib/dom-helpers.js +++ b/lighthouse-core/lib/dom-helpers.js @@ -19,6 +19,7 @@ * Combinators are not supported. * @param {!Array} */ +/* istanbul ignore next */ function getElementsInDocument(selector) { const results = []; diff --git a/package.json b/package.json index 01f4d1e2cdef..2ede10cbadf1 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,12 @@ "viewer-unit": "yarn unit-viewer", "watch": "yarn unit-core --watch", - "unit:silentcoverage": "nyc --silent yarn unit", + "unit:silentcoverage": "nyc --silent yarn unit && nyc report --reporter text-lcov > unit-coverage.lcov", "coverage": "nyc yarn unit && nyc report --reporter html", - "coveralls": "nyc report --reporter lcovonly && cat ./coverage/lcov.info | coveralls && codecov", + "smoke:silentcoverage": "nyc --silent yarn smoke && nyc report --reporter text-lcov > smoke-coverage.lcov", + "coverage:smoke": "nyc yarn smoke && nyc report --reporter html", + "coveralls": "cat unit-coverage.lcov | coveralls", + "codecov": "codecov -f unit-coverage.lcov -F unit && codecov -f smoke-coverage.lcov -F smoke", "closure": "cd lighthouse-core && node closure/closure-type-checking.js", "devtools": "bash lighthouse-core/scripts/roll-to-devtools.sh",