From 0d7169a32f2a0c39c7a89fe667d0b200d752527e Mon Sep 17 00:00:00 2001 From: Anton Yefremov Date: Sat, 4 Feb 2017 16:31:33 +0200 Subject: [PATCH 1/2] Integrate coveralls --- .travis.yml | 4 ++++ README.md | 1 + package.json | 7 ++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3574534..bcd044d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,3 +4,7 @@ node_js: - "6.1" - "5.11" - "iojs" +script: + - "npm run-script test-cov" +after_success: + - "npm run-script report-cov" diff --git a/README.md b/README.md index 5e63433..e2d458a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Algorithms with JavaScript [![Build Status](https://travis-ci.org/yefremov/algorithms-with-javascript.svg?branch=master)](https://travis-ci.org/yefremov/algorithms-with-javascript) + [![Coverage Status](https://coveralls.io/repos/github/yefremov/algorithms-with-javascript/badge.svg?branch=master)](https://coveralls.io/github/yefremov/algorithms-with-javascript?branch=master) This is a collection of different algorithms, written in JavaScript. The purpose of this library is to define basic algorithms in a concise, diff --git a/package.json b/package.json index 52bc3bb..6e9d5d5 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "Common programming algorithms written with JavaScript", "main": "index.js", "scripts": { - "test": "tape lib/**/*-test.js | tap-spec" + "test": "tape lib/**/*-test.js | tap-spec", + "test-cov": "nyc npm test", + "report-cov": "nyc report --reporter=text-lcov | coveralls" }, "repository": { "type": "git", @@ -17,6 +19,9 @@ }, "homepage": "https://github.com/yefremov/algorithms-with-javascript#readme", "devDependencies": { + "coveralls": "^2.11.15", + "nyc": "^10.1.2", + "tap-dot": "^1.0.5", "tap-spec": "^4.1.1", "tape": "^4.6.3" } From ae4bc2fabbe616cd8e20dfb8ce7ea10052135de2 Mon Sep 17 00:00:00 2001 From: Anton Yefremov Date: Sat, 4 Feb 2017 16:36:35 +0200 Subject: [PATCH 2/2] Update package.json --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 6e9d5d5..6f3930a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "devDependencies": { "coveralls": "^2.11.15", "nyc": "^10.1.2", - "tap-dot": "^1.0.5", "tap-spec": "^4.1.1", "tape": "^4.6.3" }