Skip to content

Commit c34dc3b

Browse files
committed
add coverals test covering
1 parent b2e79a5 commit c34dc3b

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
run: |
3030
python -m pip install --upgrade pip
3131
pip install -e . # Install the package in editable mode
32+
pip install coverage coveralls
3233
3334
- name: Set environment variables
3435
run: echo "BASE_REFERRAL_LINK=http://localhost:8000/" >> $GITHUB_ENV
@@ -37,6 +38,15 @@ jobs:
3738
run: |
3839
python test_app/manage.py migrate --noinput
3940
40-
- name: Run Django tests
41+
- name: Run tests with coverage
4142
run: |
42-
python test_app/manage.py test referrals
43+
coverage run --source='referrals' test_app/manage.py test referrals
44+
coverage report
45+
coverage xml
46+
47+
- name: Upload coverage to Coveralls
48+
uses: coverallsapp/[email protected]
49+
with:
50+
github-token: ${{ secrets.GITHUB_TOKEN }}
51+
env:
52+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![PyPI version](https://badge.fury.io/py/django-referral-system.svg)](https://badge.fury.io/py/django-referral-system)
55
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/soldatov-ss/django-referral-system/blob/main/LICENSE)
66
[![Python Versions](https://img.shields.io/pypi/pyversions/django-referral-system.svg)](https://pypi.org/project/django-referral-system/)
7+
[![Coverage Status](https://coveralls.io/repos/github/soldatov-ss/django-referral-system/badge.svg?branch=main)](https://coveralls.io/github/soldatov-ss/django-referral-system?branch=main)
78

89
A Django app for managing referral programs, promoters, referrals, and tracking referral performance with features like commission setting, invitation management, and Wise payouts.
910
## Documentation

test_app/test_app/requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
django-referral-system
1+
django-referral-system
2+
coverage
3+
coveralls

0 commit comments

Comments
 (0)