Skip to content

Commit

Permalink
KARMA-02 chore(coverage): setup coverage reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Xesenix committed Feb 24, 2018
1 parent 0a05fa8 commit 757ed11
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- npm run test && npm run build:prod
- npm run test
- npm run build:prod
after_success:
- npm run report-coverage
6 changes: 5 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ module.exports = function(config) {
coverageReporter: {
type: 'lcov',
dir: 'coverage/',
reporters: [
// reporters not supporting the `file` property
{ type: 'lcov', subdir: 'report-lcov' },
],
},


coverageIstanbulReporter: {
reports: [ 'text-summary' ],
fixWebpackSourcePaths: true
fixWebpackSourcePaths: true,
},


Expand Down
33 changes: 33 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"start": "http-server ./dist/",
"serve:dev": "webpack-dev-server --env.dev --env.hmr --config conf/webpack/webpack.config.js",
"build:dev": "webpack --env.dev --config conf/webpack/webpack.config.js",
"build:prod": "webpack --env.prod --config conf/webpack/webpack.config.js"
"build:prod": "webpack --env.prod --config conf/webpack/webpack.config.js",
"report-coverage": "cat ./coverage/report-lcov/lcov.info | coveralls"
},
"app": {
"root": "src",
Expand Down Expand Up @@ -64,6 +65,7 @@
"bootstrap-sass": "^3.3.7",
"clean-webpack-plugin": "^0.1.18",
"copy-webpack-plugin": "^4.4.2",
"coveralls": "^3.0.0",
"css-loader": "^0.28.10",
"dotenv-webpack": "^1.5.4",
"ejs-loader": "^0.3.0",
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Build Status](https://travis-ci.org/Xesenix/webpack-3-scaffold.svg?branch=master)](https://travis-ci.org/Xesenix/webpack-3-scaffold)
[![Appveyor Windows Build Status](https://ci.appveyor.com/api/projects/status/github/xesenix/webpack-3-scaffold?svg=true)](https://ci.appveyor.com/project/xesenix/webpack-3-scaffold)
[![Coverage Status](https://coveralls.io/repos/github/Xesenix/webpack-3-scaffold/badge.svg?branch=master)](https://coveralls.io/github/Xesenix/webpack-3-scaffold?branch=master)
[![Known Vulnerabilities](https://snyk.io/test/github/xesenix/webpack-3-scaffold/badge.svg?targetFile=package.json)](https://snyk.io/test/github/xesenix/webpack-3-scaffold?targetFile=package.json)

![Required node version >= 8.0.0](https://img.shields.io/badge/required%20node-%3E%3D%208.0.0-brightgreen.svg)
Expand Down
22 changes: 20 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2181,6 +2181,16 @@ corser@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/corser/-/corser-2.0.1.tgz#8eda252ecaab5840dcd975ceb90d9370c819ff87"

coveralls@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.0.tgz#22ef730330538080d29b8c151dc9146afde88a99"
dependencies:
js-yaml "^3.6.1"
lcov-parse "^0.0.10"
log-driver "^1.2.5"
minimist "^1.2.0"
request "^2.79.0"

create-ecdh@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d"
Expand Down Expand Up @@ -4633,7 +4643,7 @@ js-tokens@^3.0.0, js-tokens@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"

js-yaml@3.x:
js-yaml@3.x, js-yaml@^3.6.1:
version "3.10.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc"
dependencies:
Expand Down Expand Up @@ -4893,6 +4903,10 @@ lcid@^1.0.0:
dependencies:
invert-kv "^1.0.0"

lcov-parse@^0.0.10:
version "0.0.10"
resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"

levn@~0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
Expand Down Expand Up @@ -5143,6 +5157,10 @@ lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.2, lodash@^4.17.3, l
version "4.17.5"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"

log-driver@^1.2.5:
version "1.2.7"
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"

log4js@^2.3.9:
version "2.5.3"
resolved "https://registry.yarnpkg.com/log4js/-/log4js-2.5.3.tgz#38bb7bde5e9c1c181bd75e8bc128c5cd0409caf1"
Expand Down Expand Up @@ -6995,7 +7013,7 @@ replace-ext@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"

request@2, request@^2.0.0, request@^2.74.0:
request@2, request@^2.0.0, request@^2.74.0, request@^2.79.0:
version "2.83.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356"
dependencies:
Expand Down

0 comments on commit 757ed11

Please sign in to comment.