File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5252 run : docker compose -f docker-compose.local.yml run --rm django python manage.py migrate
5353
5454 - name : Test with Pytest and Coverage
55- run : |
56- docker compose -f docker-compose.local.yml run django coverage run -m pytest
57- docker compose -f docker-compose.local.yml run django coverage xml
55+ run : docker compose -f docker-compose.local.yml run django coverage run -m pytest --cov=democrasite --cov-report=xml
5856
5957 - name : Send Coverage report to Codecov
6058 uses : codecov/codecov-action@v5
Original file line number Diff line number Diff line change @@ -148,6 +148,6 @@ Test coverage
148148
149149To run the tests, check your test coverage, and generate an HTML coverage report::
150150
151- $ coverage run -m pytest
151+ $ pytest --cov=democrasite
152152 $ coverage html
153153 $ open htmlcov/index.html
Original file line number Diff line number Diff line change @@ -8,7 +8,12 @@ norecursedirs = ["node_modules"]
88# ==== Coverage ====
99[tool .coverage .run ]
1010include = [" democrasite/**" ]
11- omit = [" */migrations/*" , " */tests/*" ]
11+ omit = [
12+ " */migrations/*" ,
13+ " */tests/*" ,
14+ " democrasite/templates/account/*" ,
15+ " democrasite/templates/socialaccount/*" ,
16+ ]
1217plugins = [" django_coverage_plugin" ]
1318
1419# ==== mypy ====
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ sphinxcontrib-django==2.5 # https://github.com/sphinx-doc/sphinxcontrib-django
2020# Code quality
2121# ------------------------------------------------------------------------------
2222ruff==0.12.11 # https://github.com/astral-sh/ruff
23- coverage ==7.10.6 # https://github.com/nedbat/coveragepy
23+ pytest-cov ==7.0.0 # https://github.com/pytest-dev/pytest-cov
2424djlint==1.36.4 # https://github.com/Riverside-Healthcare/djLint
2525pre-commit==4.3.0 # https://github.com/pre-commit/pre-commit
2626
You can’t perform that action at this time.
0 commit comments