GithubHelp home page GithubHelp logo

00mjk / sourcegraph-codecov Goto Github PK

View Code? Open in Web Editor NEW

This project forked from codecov/sourcegraph-codecov

1.0 0.0 0.0 2.37 MB

See code coverage information from Codecov on GitHub, Sourcegraph, and other tools.

License: MIT License

TypeScript 100.00%

sourcegraph-codecov's Introduction

Codecov Sourcegraph extension

Build Status codecov FOSSA Status

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
  • File and directory coverage decorations on Sourcegraph

Usage

On GitHub using the Chrome extension

  1. Install Sourcegraph for Chrome
  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
  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.

With Codecov Enterprise and GitHub Enterprise

You can use this extension to overlay coverage information from your Codecov Enterprise install into GitHub Enterprise.

  1. Follow the Codecov extension usage instructions above to install Sourcegraph for Chrome
  2. From the command palette (added by the Sourcegraph browser extension, see screenshot above) on GitHub Enterprise click, "Codecov: Setup up Codecov Enterprise"
  3. From the pop up that appears, set your Version control type to: ghe
  4. From the next pop up that appears, set your Codecov endpoint, this is just the root level of your Codecov Enterprise domain, e.g., https://codecov.mycompany.com.
  5. Go to the command palette on GitHub and choose "Codecov: Set API token for private repositories"
  6. Enter your Codecov Enterprise API token.
  7. Visit any file in your Github Enterprise install with coverage data uploaded to Codecov Enterprise to see coverage data.

Note: Additional documentation, if needed, can be found in Codecov's official documentation.

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

File decorations

Enable file decorations in user, organization or global settings to see coverage status of files and directories in the file tree and on directory pages.

{
    "codecov.fileDecorations.show": true
}

File decorations

License

FOSSA Status

sourcegraph-codecov's People

Contributors

3askaal avatar anthonygedeon avatar armenzg avatar chrismwendt avatar dependabot[bot] avatar eliatcodecov avatar eseliger avatar felixfbecker avatar fossabot avatar joelkw avatar lguychard avatar ryan-blunden avatar sqs avatar thomasrockhu avatar tjkandala avatar vovakulikov avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.