An open API service indexing awesome lists of open source software.

https://github.com/davidslusser/actions_python_coveralls

Github action for running pytest with code coverage and pushing results to coveralls
https://github.com/davidslusser/actions_python_coveralls

coverage coverage-report coveralls coveralls-python pytest pytest-cov python

Last synced: 5 months ago
JSON representation

Github action for running pytest with code coverage and pushing results to coveralls

Awesome Lists containing this project

README

          

# actions_python_coveralls
A Github action for running pytest with coverage and pushing results to coveralls


## How to use
In your .github/workflows directory, create a yaml file (such as main.yaml). Add a job for each desired workflow with the `uses` keyword. Use the `with` keyword to pass any desired variables.

Examples:

```
on: [push]

jobs:
coveralls:
runs-on: ubuntu-latest
name: "coveralls"
steps:
- uses: davidslusser/actions_python_coveralls@v1.0.1
with:
coveralls_repo_token: ${{ secrets.COVERALLS_REPO_TOKEN }}
```

```
on: [push]

jobs:
coveralls:
runs-on: ubuntu-latest
name: "coveralls"
steps:
- uses: davidslusser/actions_python_coveralls@v1.0.1
with:
src: "src"
options: "--cov=src"
pip_install_command: "pip install -e .[dev]"
python_version: "3.9"
coveralls_repo_token: ${{ secrets.COVERALLS_REPO_TOKEN }}
```


## Inputs
- **coveralls_repo_token:** coveralls provided repository token
- **src:** source directory used for code coverage (defaults to "`.`")
- **options:** optional flags/parameters used in pytest command (defaults to "`--cov`")
- **pip_install_command:** pip install command (defaults to "`pip install coveralls pytest pytest-cov`")
- **python_version:** version of python to run workflow with (defaults to "`3.x`")


## Requirements
- coveralls account
- github repo setup on coveralls
- `COVERALLS_REPO_TOKEN` secret available in your Github actions secrets and variables

See Coveralls for more details: https://coveralls.io/