Coder Social home page Coder Social logo

proccaserra / coveralls-python-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andremiras/coveralls-python-action

0.0 1.0 0.0 49 KB

GitHub Action for Python Coveralls.io

License: MIT License

Dockerfile 0.41% Makefile 8.23% Python 91.21% Shell 0.16%

coveralls-python-action's Introduction

coveralls-python-action

push Coverage Status

GitHub Action for Python Coveralls.io

Screenshot

coveralls-python-action

Usage

First make sure your coverage.py is configured with relative_files = True. See the Coverage.py configuration section for examples. If this setting is missing you will likely get an error "not a git repository".

Then assuming you have a make test that runs coverage testing. The following workflow will upload it to coveralls.io.

name: push
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-python@v1

    - name: Unit tests
      run: make test

    - name: Coveralls
      uses: AndreMiras/coveralls-python-action@develop
      with:
        parallel: true
        flag-name: Unit Test

  coveralls_finish:
    needs: test
    runs-on: ubuntu-latest
    steps:
    - name: Coveralls Finished
      uses: AndreMiras/coveralls-python-action@develop
      with:
        parallel-finished: true

Configuration

- uses: AndreMiras/coveralls-python-action@develop
  with:
    # The `GITHUB_TOKEN` or `COVERALLS_REPO_TOKEN`.
    # Default: ${{ github.token }}
    github-token: ''
    # Set to `true` if you are using parallel jobs, then use `parallel-finished: true` for the last action.
    # Default: false
    parallel: ''
    # Set to `true` for the last action when using `parallel: true`.
    # Default: false
    parallel-finished: ''
    # A name to identify the current job. This is useful in combination with `parallel: true`.
    # Default: null
    flag-name: ''
    # A sub-directory in which coverage was executed.
    # Default: '.'
    base-path: ''
    # Set to true to increase logger verbosity.
    # Default: false
    debug: ''

Coverage.py configuration

The relative_files = True setting can be handled via different files such as .coveragerc, tox.ini and more, all covered in the examples below. Also see the Coverage.py configuration reference for full details.

.coveragerc

Under the [run] section:

[run]
relative_files = True

setup.cfg or tox.ini

Under the [coverage:run] section:

[coverage:run]
relative_files = True

pyproject.toml

Under the [tool.coverage.run] section. It also requires coverage to be installed with the toml extra (pip install coverage[toml]):

[tool.coverage.run]
relative_files = true

coveralls-python-action's People

Contributors

andremiras avatar dfm avatar johanneswilm avatar klieret avatar macbre avatar

Watchers

 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.