Skip to content

Repository files navigation

coveralls-python-action

pushCoverage 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: pushon: [push, pull_request]jobs:
test:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- name: Unit testsrun: make test
- name: Coverallsuses: AndreMiras/coveralls-python-action@developwith:
parallel: trueflag-name: Unit Testcoveralls_finish:
needs: testruns-on: ubuntu-lateststeps:
- name: Coveralls Finisheduses: AndreMiras/coveralls-python-action@developwith:
parallel-finished: true

Configuration

- uses: AndreMiras/coveralls-python-action@developwith:
# 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: falseparallel: ''# Set to `true` for the last action when using `parallel: true`.# Default: falseparallel-finished: ''# A name to identify the current job. This is useful in combination with `parallel: true`.# Default: nullflag-name: ''# A sub-directory in which coverage was executed.# Default: '.'base-path: ''# Set to true to increase logger verbosity.# Default: falsedebug: ''

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

About

GitHub Action for Python Coveralls.io

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages