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
- Host: GitHub
- URL: https://github.com/davidslusser/actions_python_coveralls
- Owner: davidslusser
- License: mit
- Created: 2023-05-29T19:52:39.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-11T01:24:24.000Z (over 2 years ago)
- Last Synced: 2025-10-18T18:15:28.031Z (8 months ago)
- Topics: coverage, coverage-report, coveralls, coveralls-python, pytest, pytest-cov, python
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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/