Browse Source

Adds code-coverage badge, code coverage reports, and test-cov script … (#3626)

* Adds code-coverage badge, code coverage reports, and test-cov script to master.

* install nyc

* Correct badge url
master
macleodbroad-wf 7 years ago
committed by Yotam Berkowitz
parent
commit
5563fc6168
3 changed files with 14 additions and 3 deletions
  1. +9
    -1
      .travis.yml
  2. +1
    -0
      README.md
  3. +4
    -2
      package.json

+ 9
- 1
.travis.yml View File

@ -10,9 +10,17 @@ addons:
packages: packages:
- libgif-dev - libgif-dev
- g++-4.8 - g++-4.8
code_climate:
repo_token: 07de009e5f4d0a43c51b18f3443b2fe7ddcf3fea206e75c3a81b1c4030657f69
cache:
directories:
- node_modules
before_script: before_script:
- npm run lint - npm run lint
- npm install gulp - npm install gulp
script: script:
- gulp - gulp
- npm test
- npm run-script test-cov
after_script:
- npm install -g codeclimate-test-reporter
- codeclimate-test-reporter < ./coverage/lcov.info

+ 1
- 0
README.md View File

@ -38,6 +38,7 @@ The vis.js library was initially developed by [Almende B.V](http://almende.com).
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/almende/vis.svg)](http://isitmaintained.com/project/almende/vis "Average time to resolve an issue") [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/almende/vis.svg)](http://isitmaintained.com/project/almende/vis "Average time to resolve an issue")
[![Pending Pull-Requests](http://githubbadges.herokuapp.com/almende/vis/pulls.svg)](https://github.com/almende/vis/pulls) [![Pending Pull-Requests](http://githubbadges.herokuapp.com/almende/vis/pulls.svg)](https://github.com/almende/vis/pulls)
[![Test Coverage](https://codeclimate.com/github/almende/vis/badges/coverage.svg)](https://codeclimate.com/github/almende/vis/coverage)
[![Code Climate](https://codeclimate.com/github/almende/vis/badges/gpa.svg)](https://codeclimate.com/github/almende/vis) [![Code Climate](https://codeclimate.com/github/almende/vis/badges/gpa.svg)](https://codeclimate.com/github/almende/vis)
## Install ## Install

+ 4
- 2
package.json View File

@ -27,6 +27,7 @@
"main": "./dist/vis.js", "main": "./dist/vis.js",
"scripts": { "scripts": {
"test": "mocha --compilers js:babel-core/register", "test": "mocha --compilers js:babel-core/register",
"test-cov": "nyc --reporter=lcov mocha --compilers js:babel-core/register",
"build": "gulp", "build": "gulp",
"lint": "gulp lint", "lint": "gulp lint",
"watch": "gulp watch", "watch": "gulp watch",
@ -43,10 +44,10 @@
"async": "^2.5.0", "async": "^2.5.0",
"babel-core": "^6.25.0", "babel-core": "^6.25.0",
"babel-loader": "^7.1.1", "babel-loader": "^7.1.1",
"babel-polyfill": "^6.23.0",
"babel-plugin-transform-es3-member-expression-literals": "^6.22.0", "babel-plugin-transform-es3-member-expression-literals": "^6.22.0",
"babel-plugin-transform-es3-property-literals": "^6.22.0", "babel-plugin-transform-es3-property-literals": "^6.22.0",
"babel-plugin-transform-runtime": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.24.1", "babel-preset-es2015": "^6.24.1",
"babel-runtime": "^6.23.0", "babel-runtime": "^6.23.0",
"babelify": "^7.3.0", "babelify": "^7.3.0",
@ -54,9 +55,9 @@
"clean-css": "^4.1.7", "clean-css": "^4.1.7",
"eslint": "^4.3.0", "eslint": "^4.3.0",
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-eslint": "^4.0.0",
"gulp-clean-css": "^3.7.0", "gulp-clean-css": "^3.7.0",
"gulp-concat": "^2.6.1", "gulp-concat": "^2.6.1",
"gulp-eslint": "^4.0.0",
"gulp-rename": "^1.2.2", "gulp-rename": "^1.2.2",
"gulp-util": "^3.0.8", "gulp-util": "^3.0.8",
"jsdom": "9.12.0", "jsdom": "9.12.0",
@ -64,6 +65,7 @@
"merge-stream": "^1.0.1", "merge-stream": "^1.0.1",
"mocha": "^3.4.2", "mocha": "^3.4.2",
"mocha-jsdom": "^1.1.0", "mocha-jsdom": "^1.1.0",
"nyc": "^11.2.1",
"rimraf": "^2.6.1", "rimraf": "^2.6.1",
"test-console": "^1.0.0", "test-console": "^1.0.0",
"uglify-js": "^2.8.29", "uglify-js": "^2.8.29",

Loading…
Cancel
Save