Browse Source

Merge pull request #237 from maraoz/coveralls

Add coveralls
Manuel Aráoz 8 years ago
parent
commit
2eded7a337
5 changed files with 12 additions and 1 deletions
  1. 1 0
      .coveralls.yml
  2. 2 0
      .travis.yml
  3. 1 0
      README.md
  4. 4 1
      package.json
  5. 4 0
      scripts/coveralls.sh

+ 1 - 0
.coveralls.yml

@@ -0,0 +1 @@
+repo_token: AelGMv47LJ85e3KF1PhYBsjyduSjDmP0h

+ 2 - 0
.travis.yml

@@ -10,3 +10,5 @@ before_install:
 script:
   - testrpc > /dev/null &
   - truffle test
+after_script:
+  - npm run coveralls

+ 1 - 0
README.md

@@ -1,6 +1,7 @@
 # Zeppelin Solidity
 [![NPM Package](https://img.shields.io/npm/v/zeppelin-solidity.svg?style=flat-square)](https://www.npmjs.org/package/zeppelin-solidity)
 [![Build Status](https://img.shields.io/travis/OpenZeppelin/zeppelin-solidity.svg?branch=master&style=flat-square)](https://travis-ci.org/OpenZeppelin/zeppelin-solidity)
+[![Coverage Status](https://coveralls.io/repos/github/OpenZeppelin/zeppelin-solidity/badge.svg?branch=coveralls)](https://coveralls.io/github/OpenZeppelin/zeppelin-solidity?branch=coveralls)
 
 OpenZeppelin is a library for writing secure [Smart Contracts](https://en.wikipedia.org/wiki/Smart_contract) on Ethereum.
 

+ 4 - 1
package.json

@@ -7,7 +7,8 @@
     "test": "scripts/test.sh",
     "console": "truffle console",
     "install": "scripts/install.sh",
-    "coverage": "scripts/coverage.sh"
+    "coverage": "scripts/coverage.sh",
+    "coveralls": "scripts/coveralls.sh"
   },
   "repository": {
     "type": "git",
@@ -35,7 +36,9 @@
     "babel-preset-stage-2": "^6.18.0",
     "babel-preset-stage-3": "^6.17.0",
     "babel-register": "^6.23.0",
+    "coveralls": "^2.13.1",
     "ethereumjs-testrpc": "^3.0.2",
+    "mocha-lcov-reporter": "^1.3.0",
     "solidity-coverage": "^0.1.0",
     "truffle": "https://github.com/ConsenSys/truffle.git#3.1.9"
   }

+ 4 - 0
scripts/coveralls.sh

@@ -0,0 +1,4 @@
+#! /bin/bash
+
+npm run coverage && cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+