diff --git a/Makefile b/Makefile index 169986ae..5d058137 100644 --- a/Makefile +++ b/Makefile @@ -19,3 +19,6 @@ docker-up-dev: docker-down-dev: docker-compose down + +docker-coverage-report: + docker-compose exec -i backend bash -c "coverage run manage.py test; coverage report" diff --git a/faucet/test.py b/faucet/tests.py similarity index 100% rename from faucet/test.py rename to faucet/tests.py diff --git a/pyproject.toml b/pyproject.toml index 160dfb1c..c3caf31f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,3 +5,28 @@ profile = "black" line-length = 120 target-version = ['py310'] include = '\.pyi?$' + +[tool.coverage.run] +source = [ "." ] +branch ='true' +omit = [ + "*/migrations/*", + "*/test*.*", + "*/*/__init__.py", + "*/apps.py", + "*/admin.py", + "*/urls.py", + "tmp.py", + "manage.py", + "load_test.py", + "faucet/management/*", + "faucet/faucet_manager/*_abi.py", + "faucet/faucet_manager/anchor_client/*", + "faucet/faucet_manager/brightid_user_registry.py", + "faucet/faucet_manager/bright_id_interface.py", + "faucet/faucet_manager/lnpay_manager/*", + "*/settings.py", + "*/asgi.py", + "*/wsgi.py", + "*/celery.py" +] diff --git a/requirements.txt b/requirements.txt index 7d230197..66e61ce1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,3 +26,4 @@ web3==6.9.0 whitenoise==6.1.0 solana==0.29.1 solders==0.14.3 +coverage~=7.3.2