diff --git a/.gitignore b/.gitignore index d340c92c..1b1350f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules/ testlocales/ +coverage/ .DS_Store /npm-debug.log /i18n-cov.js diff --git a/.jshintignore b/.jshintignore index dc9e7989..7d2505f0 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,3 +1,4 @@ node_modules/ examples/ -i18n-cov.js \ No newline at end of file +coverage/ +i18n-cov.js diff --git a/.travis.yml b/.travis.yml index f2df97c8..4fe3687c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,15 @@ node_js: - 0.12 - 4 - 5 + - iojs branches: only: - master - stable - - develop \ No newline at end of file +before_install: + - "npm install -g istanbul" +script: + - "npm run test-ci" +after_script: + - "npm install -g coveralls" + - "cat ./coverage/lcov.info | coveralls" diff --git a/Makefile b/Makefile index c7bb651e..2678ab32 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ lib-cov: examples: for example in examples/*/test.js ; do \ - mocha --reporter $(REPORTER) $$example; \ + mocha --reporter $(REPORTER) $$example; \ done all: test examples diff --git a/README.md b/README.md index 8f695e2c..b2c4dd46 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,12 @@ Stores language files in json files compatible to [webtranslateit](http://webtra Adds new strings on-the-fly when first used in your app. No extra parsing needed. -[![Build Status](https://api.travis-ci.org/mashpie/i18n-node.svg?branch=master)](http://travis-ci.org/mashpie/i18n-node) [![NPM version](https://badge.fury.io/js/i18n.svg)](http://badge.fury.io/js/i18n) -[![Dependency Status](https://gemnasium.com/mashpie/i18n-node.svg)](https://gemnasium.com/mashpie/i18n-node) +[![Linux Build][travis-image]][travis-url] +[![Windows Build][appveyor-image]][appveyor-url] +[![NPM version][npm-v-image]][npm-url] +[![Dependency Status][dependency-image]][dependency-url] +[![Test Coverage][coveralls-image]][coveralls-url] + ## Install ```sh @@ -576,3 +580,15 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +[npm-url]: https://www.npmjs.com/package/i18n +[npm-v-image]: https://img.shields.io/npm/v/i18n.svg +[npm-dm-image]: https://img.shields.io/npm/dm/i18n.svg +[travis-image]: https://img.shields.io/travis/SuperPaintman/i18n-node/master.svg?label=linux +[travis-url]: https://travis-ci.org/SuperPaintman/i18n-node +[appveyor-image]: https://img.shields.io/appveyor/ci/SuperPaintman/i18n-node/master.svg?label=windows +[appveyor-url]: https://ci.appveyor.com/project/SuperPaintman/i18n-node +[coveralls-image]: https://img.shields.io/coveralls/SuperPaintman/i18n-node/master.svg +[coveralls-url]: https://coveralls.io/r/SuperPaintman/i18n-node?branch=master +[dependency-image]: https://img.shields.io/gemnasium/mashpie/i18n-node.svg +[dependency-url]: https://gemnasium.com/mashpie/i18n-node diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..1fc97dc0 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,19 @@ +environment: + matrix: + - nodejs_version: "0.10" + - nodejs_version: "0.12" + - nodejs_version: "4" + - nodejs_version: "5" + - nodejs_version: "iojs" +branches: + only: + - master + - stable +install: + - "npm install -g jshint" + - "npm install -g istanbul" + - "npm install" +build: off +test_script: + - "npm run test-ci" +version: "{build}" \ No newline at end of file diff --git a/package.json b/package.json index 7f07c9c1..ddc4906f 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,8 @@ }, "scripts": { "jshint": "jshint --verbose .", - "test": "npm run jshint && make test" + "test": "npm run jshint && make test", + "test-ci": "npm run jshint && istanbul cover ./node_modules/mocha/bin/_mocha" }, "license": "MIT" }