fetch-coverage
Fetch the code coverage from an open-source GIT repository, using a variety of well-known coverage services.
Currently supports GitHub, Bitbucket and GitLab repositories and checks against Coveralls, Code Climate, Scrutinizer and Codecov.
Feel free to make a PR adding support for another coverage service.
Installation
$ npm install fetch-coverage
Usage
fetchCoverage(repositoryUrl, options) -> Promise
const fetchCoverage = require('fetch-coverage');
fetchCoverage('git@github.com:moxystudio/node-planify.git')
.then((coverage) => console.log('Coverage', coverage));
The repositoryUrl
is any valid cloneable URL.
Available options:
branch
: The target branch (only supported in some services)services
: The services to fetch from, defaults to all servicesgot
: Custom options to be passed to got, defaults to { timeout: 15000 }
badges
: The badges information gathered by detect-readme-badges which might speed up the fetching process
Tests
$ npm test
$ npm test -- --watch
License
Released under the MIT License.