Skip to content

Fetch the code coverage from an open-source GIT repository, using a variety of well-known coverage services

License

Notifications You must be signed in to change notification settings

moxystudio/node-fetch-coverage

Folders and files

NameName
Last commit message
Last commit date
Aug 13, 2019
Aug 13, 2019
Sep 23, 2018
Sep 23, 2018
Sep 23, 2018
Sep 23, 2018
Oct 12, 2018
Aug 13, 2019
Sep 23, 2018
Nov 24, 2019
Sep 25, 2018
Nov 2, 2019
Jan 3, 2020

Repository files navigation

fetch-coverage

NPM version Downloads Build Status Coverage Status Dependency status Dev Dependency status

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')
 // `coverage` is a number between 0 and 1 or `null` if there's no code coverage
.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 services
  • got: 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 # during development

License

Released under the MIT License.

About

Fetch the code coverage from an open-source GIT repository, using a variety of well-known coverage services

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published