Skip to content

Commit

Permalink
add travis covellas
Browse files Browse the repository at this point in the history
  • Loading branch information
navyxie committed May 27, 2016
1 parent 8bb5df3 commit 795dd6d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
service_name: travis-pro
repo_token: YeNnTodALGVqjWXfAeZHPyx1un6M1mimv
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
coverage
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
coverage
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: node_js

repo_token: YeNnTodALGVqjWXfAeZHPyx1un6M1mimv

node_js:

- 0.10.35


script: npm test

after_script: npm run cov

after_success:
"curl -L -l https://coveralls.io/repos/github/navyxie/random/badge.svg?branch=master"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 概率生成器

[![Build Status via Travis CI](https://travis-ci.org/navyxie/random.svg?branch=master)](https://travis-ci.org/navyxie/random) [![Coverage Status](https://coveralls.io/repos/github/navyxie/random/badge.svg?branch=master)](https://coveralls.io/github/navyxie/random?branch=master)

## API

- [`rate`](#rate)
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "random item by rate.(返回一个按概率的值)",
"main": "index.js",
"scripts": {
"test": "mocha test.js"
"test": "npm install && mocha test.js",
"cov":"npm install && ./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
},
"repository": {
"type": "git",
Expand All @@ -20,7 +21,9 @@
],
"devDependencies": {
"mocha": "^2.2.5",
"should": "^8.3.0"
"should": "^8.3.0",
"istanbul": "^0.4.3",
"coveralls": "2.11.9"
},
"author": {
"name": "navyxie"
Expand Down

0 comments on commit 795dd6d

Please sign in to comment.