From b5314804f3eecfd2e5440da5899da90d9789f8fe Mon Sep 17 00:00:00 2001 From: ft Date: Sun, 1 Mar 2015 14:26:07 +0800 Subject: [PATCH] add travis --- .gitignore | 2 ++ .travis.yml | 5 +++++ package.json | 13 +++++++++---- readme.md | 3 +++ 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 .gitignore create mode 100644 .travis.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..62562b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +coverage +node_modules diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f0dec11 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +branches: + only: + - gh-pages +after_script: npm install coveralls@2.10.0 && cat ./coverage/lcov.info | coveralls diff --git a/package.json b/package.json index 1a8313b..b753a98 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { "name": "min-bench", - "version": "1.0.0", + "version": "1.0.1", "description": "simple benchmark for javascript code", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "readme": "pretty-readme > readme.md" + "test": "npm run cov", + "readme": "pretty-readme > readme.md", + "cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test" }, "repository": { "type": "git", @@ -20,5 +21,9 @@ "bugs": { "url": "https://github.com/chunpu/min-bench/issues" }, - "homepage": "https://github.com/chunpu/min-bench" + "homepage": "https://github.com/chunpu/min-bench", + "devDependencies": { + "istanbul": "^0.3.6", + "mocha": "^2.1.0" + } } diff --git a/readme.md b/readme.md index 0099967..26c23a4 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,7 @@ min-bench === +[![Build status][travis-image]][travis-url] [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][downloads-url] [![Dependency Status][david-image]][david-url] @@ -46,5 +47,7 @@ License [![License][license-image]][license-url] +[travis-image]: https://img.shields.io/travis/chunpu/min-bench.svg?style=flat-square +[travis-url]: https://travis-ci.org/chunpu/min-bench [license-image]: http://img.shields.io/npm/l/min-bench.svg?style=flat-square [license-url]: #