From 41a6f1cd84e28df4e5ed9610aaf7725dce78dae0 Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Wed, 31 May 2017 17:15:50 -0300 Subject: [PATCH] add coveralls --- .coveralls.yml | 1 + .travis.yml | 2 ++ README.md | 1 + package.json | 5 ++++- scripts/coveralls.sh | 4 ++++ 5 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .coveralls.yml create mode 100755 scripts/coveralls.sh diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 000000000..2d4b88950 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +repo_token: AelGMv47LJ85e3KF1PhYBsjyduSjDmP0h diff --git a/.travis.yml b/.travis.yml index 4cbfbe6bc..a8f72598e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,3 +10,5 @@ before_install: script: - testrpc > /dev/null & - truffle test +after_script: + - npm run coveralls diff --git a/README.md b/README.md index 925801fe4..a64985158 100644 --- a/README.md +++ b/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. diff --git a/package.json b/package.json index dbfdaa06b..093cb01f2 100644 --- a/package.json +++ b/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" } diff --git a/scripts/coveralls.sh b/scripts/coveralls.sh new file mode 100755 index 000000000..0d2d04e0c --- /dev/null +++ b/scripts/coveralls.sh @@ -0,0 +1,4 @@ +#! /bin/bash + +npm run coverage && cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js +