Skip to content

Commit

Permalink
ci: add coveralls coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmeinke committed Jul 24, 2017
1 parent 6a49b82 commit 61b9ba4
Show file tree
Hide file tree
Showing 6 changed files with 494 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage/
cjs/
dist/
examples/*/dist.js
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.gitignore
.travis.yml
bundle.js
coverage/
src/
tests/
yarn.lock
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ script:
- npm run lint
- npm test
after_success:
- npm run coveralls
- npm run semantic-release
branches:
except:
Expand Down
17 changes: 15 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ module.exports = config => {
browsers: [ 'ChromeHeadless' ],
colors: true,
concurrency: Infinity,
coverageReporter: {
reporters: [
{ type: 'lcov' },
{ type: 'json' },
{ type: 'clover' },
{ type: 'text-summary' }
],
subdir: '.'
},
files: [
{ pattern: 'src/**/*.js', included: false },
'tests/**/*.js'
Expand All @@ -23,15 +32,19 @@ module.exports = config => {
'src/**/*.js': [ 'rollup' ],
'tests/**/*.js': [ 'rollup' ]
},
reporters: [ 'mocha' ],
reporters: [ 'mocha', 'coverage' ],
rollupPreprocessor: {
exports: 'named',
format: 'iife',
moduleName: 'wilderness',
plugins: [
babel({
exclude: 'node_modules/**',
plugins: [ 'transform-object-rest-spread', 'external-helpers' ],
plugins: [
'transform-object-rest-spread',
'external-helpers',
[ 'istanbul', { 'exclude': [ 'node_modules/**', 'tests/**/*.js' ] } ]
],
presets: [[ 'es2015', { 'modules': false } ]]
}),
commonJs(),
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,20 @@
"babel-cli": "^6.24.1",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-inline-replace-variables": "^1.3.1",
"babel-plugin-istanbul": "^4.1.4",
"babel-plugin-replace-identifiers": "^0.1.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-es2015": "^6.24.1",
"bluebird": "^3.5.0",
"chai": "^4.1.0",
"commitizen": "^2.9.6",
"coveralls": "^2.13.1",
"cz-conventional-changelog": "^2.0.0",
"karma": "^1.7.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.3",
"karma-rollup-preprocessor": "^4.0.1",
Expand Down Expand Up @@ -98,6 +101,7 @@
"build:cjs": "NODE_ENV=production BABEL_ENV=cjs babel src --out-dir cjs",
"build:modules": "NODE_ENV=production BABEL_ENV=modules babel src --out-dir modules",
"commit": "git-cz",
"coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls",
"fix": "standard --fix",
"lint": "standard --verbose | snazzy",
"prepublish": "npm run tidy && npm run build",
Expand Down

0 comments on commit 61b9ba4

Please sign in to comment.