Giter Club home page Giter Club logo

coverage's Introduction

Python Coverage: The Esential Coverage Reporter GitHub Action for python

โ˜‚๏ธ parse and publish coverage xml to a PR, enforce coverage rate on new & modified files

Usage

Create a new workflow .yml file in the .github/workflows/ directory.

You can create a coverage report using python:

  • pytest $ pytest --cov-report xml:path/to/coverage.xml
  • coverage $ coverage xml path/to/coverage.xml

Minimal Configuration

name: 'coverage'
on:
    pull_request:
        branches:
            - master
            - main
jobs:
    coverage:
        runs-on: ubuntu-latest
        steps:
          - name: Get Cover 
            uses: orgoro/[email protected]
            with:
                coverageFile: path/to/coverage.xml
                token: ${{ secrets.GITHUB_TOKEN }}

PR Message & Job Summary ๐Ÿ†•

message

Inputs

Input Optional Description Example
coverageFile path to .xml coverage report ./path/to/coverage.xml
token your github token ๐Ÿคซ
thresholdAll โœ… the minimal average line coverage 0.8
thresholdNew โœ… the minimal average new files line coverage 0.9
thresholdModified โœ… the minimal average modified files line coverage 0.0
passIcon โœ… the indicator to use for files that passed ๐ŸŸข
failIcon โœ… the indicator to use for files that failed ๐Ÿ”ด

coverage's People

Contributors

orgoro avatar dependabot[bot] avatar oreporan avatar ciuliene avatar john-williams avatar seluj78 avatar paddatrapper avatar samwho avatar vinaypuppal 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.