Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andremiras/coveralls-python-action
GitHub Action for Python Coveralls.io
https://github.com/andremiras/coveralls-python-action
Last synced: 3 days ago
JSON representation
GitHub Action for Python Coveralls.io
- Host: GitHub
- URL: https://github.com/andremiras/coveralls-python-action
- Owner: AndreMiras
- License: mit
- Created: 2020-04-11T10:22:22.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2024-09-26T09:21:06.000Z (3 months ago)
- Last Synced: 2024-12-15T20:23:00.948Z (9 days ago)
- Language: Python
- Size: 49.8 KB
- Stars: 48
- Watchers: 3
- Forks: 19
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# coveralls-python-action
[![push](https://github.com/AndreMiras/coveralls-python-action/workflows/push/badge.svg?branch=develop)](https://github.com/AndreMiras/coveralls-python-action/actions?query=workflow%3Apush)
[![Coverage Status](https://coveralls.io/repos/github/AndreMiras/coveralls-python-action/badge.svg?branch=develop)](https://coveralls.io/github/AndreMiras/coveralls-python-action?branch=develop)GitHub Action for Python [Coveralls.io](https://coveralls.io/)
## Screenshot
![coveralls-python-action](https://i.imgur.com/GMLdGT7.png "Screenshot")## Usage
First make sure your `coverage.py` is configured with [`relative_files = True`](https://coverage.readthedocs.io/en/coverage-5.2.1/config.html#config-run-relative-files).
See the [Coverage.py configuration](#coveragepy-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.```yaml
name: push
on: [push, pull_request]jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5- name: Unit tests
run: make test- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Testcoveralls_finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
```## Configuration
```yaml
- 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](https://coverage.readthedocs.io/en/coverage-5.2.1/config.html#configuration-reference) for full details.### .coveragerc
Under the `[run]` section:
```ini
[run]
relative_files = True
```### setup.cfg or tox.ini
Under the `[coverage:run]` section:
```ini
[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]`):
```ini
[tool.coverage.run]
relative_files = true
```