Automatically see code coverage data and line annotations while browsing files or reviewing pull requests in GitHub.
If you wish to simply use the extension, it is available as a Firefox Add On and a Chrome 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:
- Line coverage information while viewing commits and single files
- Line coverage information and coverage totals on Pull Requests
- The ability to filter coverage using Flags and Components directly in the GitHub UI
Pre-requisites:
- Must use either Firefox or Google Chrome web browsers.
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.
You can use this extension against installations of Codecov and GitHub that are:
- Self-hosted
- Part of Codecov's Dedicated Cloud plan
In order to do so you must provide:
- The URL of the Codecov installation
- The URL of your GitHub installation (even if that url is just https://github.com)
- An API token for Codecov
You can provide this information by using the Settings menu for the Extension in your browser.
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.
$ 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).
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
Codecov is the all-in-one code coverage reporting solution for any test suite - giving developers actionable insights to deploy reliable code with confidence.