codecov / codecov-browser-extension

A browser extension for Codecov. Works for Chrome and Firefox
Apache License 2.0
37 stars 12 forks source link

Codecov Browser Extension for GitHub

FOSSA Status

Chrome Web Store Chrome Web Store Chrome Web Store

Mozilla Add-on Version Mozilla Add-on Users Mozilla Add-on Rating

image

Automatically see code coverage data and line annotations while browsing files or reviewing pull requests in GitHub.

Installing

If you wish to simply use the extension, it is available as a Firefox Add On and a Chrome Extension.

About this extension

The Codecov browser extension makes it easy to identify needed test areas by showing you absolute coverage and coverage changes overlaid with your code right in GitHub.

Once installed, get:

Pre-requisites:

How to enable:

The extension uses your logged-in session to determine what private repos you have access to. Please make sure to log in to Codecov using your web browser to view coverage data for private repos in GitHub.

Use with Self-Hosted and Dedicated Cloud Versions of Codecov

You can use this extension against installations of Codecov and GitHub that are:

In order to do so you must provide:

You can provide this information by using the Settings menu for the Extension in your browser.

Using the Safari extension

We have published a Safari port of the extension, but it comes with the caveat that you must use a Codecov API token for the extension to work.

To use the extension with a cloud Codecov API token, follow the instructions above, but generate the API token in cloud Codecov and use the cloud urls for Codecov's API (https://api.codecov.io) and Github (https://github.com). Note that this also works on Chrome and Firefox, should you want to do that.

We may fix this restriction in the future should the demand exist, but for now, this is just a low effort conversion provided as is.

Running Locally

$ web-ext run -s dist -t chromium

Note: You must be on GitHub's new UI for this extension to perform its magic. ✨

As of today, GitHub will show you the old UI if not logged in (running in a temporary profile using web-ext).


Build Instructions

These steps will build the extension in the dist/ folder.

MacOS 13.3.1 (22E261)
NodeJS version 19.8.1

Chrome

$ npm install
$ npm run build

Firefox

$ npm install
$ npm run build
$ cp dist/manifest.firefox.json dist/manifest.json

About Codecov

Codecov is the all-in-one code coverage reporting solution for any test suite - giving developers actionable insights to deploy reliable code with confidence.

License

FOSSA Status