GithubHelp home page GithubHelp logo

jleni / python-codacy-coverage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from archived-codacy/python-codacy-coverage

0.0 1.0 0.0 66 KB

Python coverage reporter for Codacy

License: BSD 3-Clause "New" or "Revised" License

Python 71.15% Smarty 28.85%

python-codacy-coverage's Introduction

python-codacy-coverage

Credits to Ryan for creating this! Python coverage reporter for Codacy https://www.codacy.com

Codacy Badge Codacy Badge Build Status PyPI version

Setup

Codacy assumes that coverage is previously configured for your project.

To generate the required coverage XML file, calculate coverage for your project as normal, by running:

coverage xml

Install codacy-coverage

You can install the coverage reporter by running:

pip install codacy-coverage

Updating Codacy

To update Codacy, you will need your project API token. You can create the token in Project -> Settings -> Integrations -> Add Integration -> Project API

Then set it in your terminal, replacing %Project_Token% with your own token:

export CODACY_PROJECT_TOKEN=%Project_Token%

Enterprise only (Skip this step if you are using https://www.codacy.com)

To send coverage in the enterprise version you should:

export CODACY_API_BASE_URL=<Codacy_instance_URL>:16006

Upload Coverage

Next, simply run the Codacy reporter. It will find the current commit and send all details to your project dashboard:

python-codacy-coverage -r coverage.xml

Note: You should keep your API token well protected, as it grants owner permissions to your projects.

Troubleshoot

If you are using any CI that does not have .git information, you can specify the commit with -c and the clone directory with -d. For example if you are using AppVeyor you can:

python-codacy-coverage -c $APPVEYOR_REPO_COMMIT -d $APPVEYOR_BUILD_FOLDER -r coverage.xml

python-codacy-coverage's People

Contributors

machadoit avatar mrfyda avatar rshipp avatar pcmanticore avatar rtfpessoa avatar spresse1 avatar anentropic avatar danielkoster avatar jkrukoff avatar mathebox avatar nmohoric avatar philippwendler avatar pedrorijo91 avatar

Watchers

James Cloos 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.