Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Adding code coverage with Codacy support (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliperelman authored Mar 29, 2017
1 parent 3afd737 commit 9871634
Show file tree
Hide file tree
Showing 6 changed files with 278 additions and 66 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
.nyc_output

# node-waf configuration
.lock-wscript
Expand Down
61 changes: 31 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
language: node_js
node_js:
- '6.9'
- '7.7'
- '7'
cache:
yarn: true
directories:
- node_modules
- packages/neutrino/node_modules
- packages/neutrino-middleware-banner/node_modules
- packages/neutrino-middleware-chunk/node_modules
- packages/neutrino-middleware-clean/node_modules
- packages/neutrino-middleware-compile-loader/node_modules
- packages/neutrino-middleware-copy/node_modules
- packages/neutrino-middleware-env/node_modules
- packages/neutrino-middleware-eslint/node_modules
- packages/neutrino-middleware-font-loader/node_modules
- packages/neutrino-middleware-hot/node_modules
- packages/neutrino-middleware-html-loader/node_modules
- packages/neutrino-middleware-html-template/node_modules
- packages/neutrino-middleware-image-loader/node_modules
- packages/neutrino-middleware-loader-merge/node_modules
- packages/neutrino-middleware-minify/node_modules
- packages/neutrino-middleware-named-modules/node_modules
- packages/neutrino-middleware-start-server/node_modules
- packages/neutrino-middleware-style-loader/node_modules
- packages/neutrino-preset-airbnb-base/node_modules
- packages/neutrino-preset-jest/node_modules
- packages/neutrino-preset-karma/node_modules
- packages/neutrino-preset-mocha/node_modules
- packages/neutrino-preset-node/node_modules
- packages/neutrino-preset-react/node_modules
- packages/neutrino-preset-web/node_modules
- node_modules
- packages/neutrino/node_modules
- packages/neutrino-middleware-banner/node_modules
- packages/neutrino-middleware-chunk/node_modules
- packages/neutrino-middleware-clean/node_modules
- packages/neutrino-middleware-compile-loader/node_modules
- packages/neutrino-middleware-copy/node_modules
- packages/neutrino-middleware-env/node_modules
- packages/neutrino-middleware-eslint/node_modules
- packages/neutrino-middleware-font-loader/node_modules
- packages/neutrino-middleware-hot/node_modules
- packages/neutrino-middleware-html-loader/node_modules
- packages/neutrino-middleware-html-template/node_modules
- packages/neutrino-middleware-image-loader/node_modules
- packages/neutrino-middleware-loader-merge/node_modules
- packages/neutrino-middleware-minify/node_modules
- packages/neutrino-middleware-named-modules/node_modules
- packages/neutrino-middleware-start-server/node_modules
- packages/neutrino-middleware-style-loader/node_modules
- packages/neutrino-preset-airbnb-base/node_modules
- packages/neutrino-preset-jest/node_modules
- packages/neutrino-preset-karma/node_modules
- packages/neutrino-preset-mocha/node_modules
- packages/neutrino-preset-node/node_modules
- packages/neutrino-preset-react/node_modules
- packages/neutrino-preset-web/node_modules
before_script:
- yarn bootstrap
- yarn bootstrap
script:
- yarn lint
- yarn test
- yarn lint
- yarn test
- codecov
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Create and build modern JavaScript applications with zero initial configuration
#### Neutrino combines the power of Webpack with the simplicity of presets.

[![NPM version][npm-image]][npm-url] [![NPM downloads][npm-downloads]][npm-url] [![Join Slack][slack-image]][slack-url]
[![NPM version][npm-image]][npm-url] [![NPM downloads][npm-downloads]][npm-url] [![Codacy][codacy-image]][codacy-url] [![codecov][codecov-image]][codecov-url] [![Join Slack][slack-image]][slack-url]

[https://github.com/mozilla-neutrino/neutrino-dev](https://github.com/mozilla-neutrino/neutrino-dev)

Expand All @@ -29,3 +29,7 @@ for details on installation, getting started, usage, and customizing.
[npm-url]: https://npmjs.org/package/neutrino
[slack-image]: https://neutrino-slack.herokuapp.com/badge.svg
[slack-url]: https://neutrino-slack.herokuapp.com/
[codacy-image]: https://api.codacy.com/project/badge/Grade/8717707007704c929de39ec20b7b0542
[codacy-url]: https://www.codacy.com/app/Neutrino/neutrino-dev?utm_source=github.com&utm_medium=referral&utm_content=mozilla-neutrino/neutrino-dev&utm_campaign=badger
[codecov-image]: https://codecov.io/gh/mozilla-neutrino/neutrino-dev/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/mozilla-neutrino/neutrino-dev
6 changes: 5 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Create and build modern JavaScript applications with zero initial configuration
#### Neutrino combines the power of Webpack with the simplicity of presets.

[![NPM version][npm-image]][npm-url] [![NPM downloads][npm-downloads]][npm-url] [![Join Slack][slack-image]][slack-url]
[![NPM version][npm-image]][npm-url] [![NPM downloads][npm-downloads]][npm-url] [![Codacy][codacy-image]][codacy-url] [![codecov][codecov-image]][codecov-url] [![Join Slack][slack-image]][slack-url]

[https://github.com/mozilla-neutrino/neutrino-dev](https://github.com/mozilla-neutrino/neutrino-dev)

Expand All @@ -29,3 +29,7 @@ for details on installation, getting started, usage, and customizing.
[npm-url]: https://npmjs.org/package/neutrino
[slack-image]: https://neutrino-slack.herokuapp.com/badge.svg
[slack-url]: https://neutrino-slack.herokuapp.com/
[codacy-image]: https://api.codacy.com/project/badge/Grade/8717707007704c929de39ec20b7b0542
[codacy-url]: https://www.codacy.com/app/Neutrino/neutrino-dev?utm_source=github.com&utm_medium=referral&utm_content=mozilla-neutrino/neutrino-dev&utm_campaign=badger
[codecov-image]: https://codecov.io/gh/mozilla-neutrino/neutrino-dev/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/mozilla-neutrino/neutrino-dev
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
"release": "yarn release:pre && oao publish",
"release:pre": "oao prepublish",
"reset-versions": "oao reset-all-versions",
"test": "ava packages/*/test"
"test": "nyc --reporter lcov ava packages/*/test"
},
"devDependencies": {
"ava": "^0.18.2",
"babel-eslint": "^7.2.1",
"changelog": "^1.0.7",
"codecov": "^2.1.0",
"eslint": "^3.18.0",
"eslint-config-airbnb-base": "^11.1.1",
"eslint-plugin-babel": "^4.1.1",
Expand All @@ -40,6 +41,7 @@
"gitbook-plugin-npmsearchlist": "^1.0.0",
"gitbook-plugin-prism": "^2.2.0",
"graph-data-structure": "^0.8.0",
"nyc": "^10.2.0",
"oao": "^0.8.0",
"prettier": "^0.22.0",
"semver": "^5.3.0",
Expand Down
Loading

0 comments on commit 9871634

Please sign in to comment.