Skip to content

Commit a3cb041

Browse files
authored
Merge pull request #9 from laisee/codex/add-pytest-coverage-badge-to-readme
Add coverage to CI
2 parents adc03d7 + ece0240 commit a3cb041

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ jobs:
2626
run: |
2727
python -m pip install --upgrade pip
2828
pip install -r requirements.txt
29-
30-
# Run tests using pytest
29+
pip install pytest-cov
30+
31+
# Run tests using pytest with coverage
3132
- name: Run tests
3233
run: |
33-
pytest -v
34+
pytest -v --cov=./ --cov-report=xml
35+
36+
- name: Upload coverage to Codecov
37+
uses: codecov/codecov-action@v3

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[![Build](https://github.com/laisee/client-python-fix/actions/workflows/python-package.yml/badge.svg)](https://github.com/laisee/client-python-fix/actions/workflows/python-package.yml)
22
[![Ruff](https://github.com/laisee/client-python-fix/actions/workflows/rufflint.yml/badge.svg)](https://github.com/laisee/client-python-fix/actions/workflows/rufflint.yml)
33
[![Security Check](https://github.com/laisee/client-python-fix/actions/workflows/security-check.yml/badge.svg)](https://github.com/laisee/client-python-fix/actions/workflows/security-check.yml)
4+
[![Coverage](https://codecov.io/gh/laisee/client-python-fix/branch/main/graph/badge.svg)](https://codecov.io/gh/laisee/client-python-fix)
45
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
56

67
<a href="https://www.python.org/downloads/release/python-3110/">

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ simplefix==1.0.17
33
websockets==11.0.3
44
pytest==8.2.2
55
PyJWT==2.9.0
6+
pytest-cov==4.1.0

0 commit comments

Comments
 (0)