Codecov coverage standard for Python

Python-Standard

This is a Python application, with basic unit tests, for which coverage is uploaded to Codecov on a daily basis. It can also serve as an example for how to integrate Codecov into your Python project. If the build is passing for this project, then Codecov’s Python report processing is functional and correct on codecov.io.

Configuration

This project is written in Python 3.9. Unit tests are written with the pytest framework and coverage reports are generated using the pytest-cov plugin.

Unit tests: /test_index.py

Inside .github/workflows/python-standard.yml file:

install:
  - pip install codecov
  - pip install pytest-cov
script:
  - pytest --cov=./ --cov-report=xml
  - codecov

Usage

Run unit tests inside a Docker container

docker-compose up

Generate coverage reports via pytest

pytest --cov=./ --cov-report=xml

 

 

 

To finish reading, please visit source site