Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ jobs:
run: docker compose -f docker-compose.local.yml run --rm django python manage.py migrate

- name: Test with Pytest and Coverage
run: |
docker compose -f docker-compose.local.yml run django coverage run -m pytest
docker compose -f docker-compose.local.yml run django coverage xml
run: docker compose -f docker-compose.local.yml run django coverage run -m pytest --cov=democrasite --cov-report=xml

- name: Send Coverage report to Codecov
uses: codecov/codecov-action@v5
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,6 @@ Test coverage

To run the tests, check your test coverage, and generate an HTML coverage report::

$ coverage run -m pytest
$ pytest --cov=democrasite
$ coverage html
$ open htmlcov/index.html
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ norecursedirs = ["node_modules"]
# ==== Coverage ====
[tool.coverage.run]
include = ["democrasite/**"]
omit = ["*/migrations/*", "*/tests/*"]
omit = [
"*/migrations/*",
"*/tests/*",
"democrasite/templates/account/*",
"democrasite/templates/socialaccount/*",
]
plugins = ["django_coverage_plugin"]

# ==== mypy ====
Expand Down
2 changes: 1 addition & 1 deletion requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sphinxcontrib-django==2.5 # https://github.com/sphinx-doc/sphinxcontrib-django
# Code quality
# ------------------------------------------------------------------------------
ruff==0.12.11 # https://github.com/astral-sh/ruff
coverage==7.10.6 # https://github.com/nedbat/coveragepy
pytest-cov==7.0.0 # https://github.com/pytest-dev/pytest-cov
djlint==1.36.4 # https://github.com/Riverside-Healthcare/djLint
pre-commit==4.3.0 # https://github.com/pre-commit/pre-commit

Expand Down