See code coverage information from Codecov on GitHub, Sourcegraph, and other tools.
Clone or download
sqs docs: update for new new extension listing guidelines/fields
Updates to reflect the changes to extension listings on the extension registry in sourcegraph/sourcegraph#1612 and sourcegraph/sourcegraph#1613:

- Extensions can have tags and categories.
- Extensions no longer have titles. The extension ID and the extension description are the only things shown now.
- The extension description can/should be shorter now that it's shown on 1 line and there is no title.
Latest commit f4ff5f5 Jan 15, 2019

README.md

Codecov Sourcegraph extension

A Sourcegraph extension for showing code coverage information from Codecov on GitHub, Sourcegraph, and other tools.

🎥 Demo video

🗃️ Source code

Add to Sourcegraph

Features

  • Support for GitHub.com and Sourcegraph.com
  • Line coverage overlays on files (with green/yellow/red background colors)
  • Line branches/hits annotations on files
  • File coverage ratio indicator (Coverage: N%) and toggle button
  • Support for using a Codecov API token to see coverage for private repositories

Usage

On GitHub using the Chrome extension

  1. Install Sourcegraph for Chrome or Sourcegraph for Firefox
  2. Enable the Codecov extension on Sourcegraph
  3. Visit tuf_store.go in theupdateframework/notary on GitHub (or any other file in a public repository that has Codecov code coverage)
  4. Click the Coverage: N% button to toggle Codecov test coverage background colors on the file (scroll down if they aren't immediately visible)

Screenshot

With private GitHub.com repositories

You can use the Codecov extension for private repositories on GitHub.com. Your code is never sent to Sourcegraph.

  1. Follow the Codecov extension usage instructions above to install Sourcegraph for Chrome/Firefox
  2. Go to the command palette on GitHub (added by the Sourcegraph browser extension, see screenshot below) and choose "Codecov: Set API token for private repositories"
  3. Enter your Codecov API token
  4. Visit any file in a GitHub.com private repository that has Codecov coverage data

image

Your code is never sent to Sourcegraph. The Codecov extension runs on the client side in a Web Worker and communicates with Codecov directly to retrieve code coverage data.

On Sourcegraph.com

  1. Visit tuf_store.go in theupdateframework/notary on Sourcegraph.com (or any other file that has Codecov code coverage)
  2. Click the Coverage: N% button to toggle Codecov test coverage background colors on the file (sign-in required)

The Codecov extension is enabled by default on Sourcegraph.com, so you don't need to add it from its extension registry listing.

With a self-hosted Sourcegraph instance and the browser extension

If you're using a self-hosted Sourcegraph instance (not required), you need to explicitly enable Sourcegraph extensions.

  1. Open the Sourcegraph for Chrome/Firefox extension options page (by clicking the Sourcegraph icon in the browser toolbar)
  2. Check the box labeled Use Sourcegraph extensions