chore: split test and coverage tasks

This commit is contained in:
jo 2022-12-07 11:42:16 +01:00 committed by Kyle Robbertze
parent 2ccd93299a
commit 14beb885a3
16 changed files with 37 additions and 21 deletions

View file

@ -13,18 +13,10 @@ export DJANGO_SETTINGS_MODULE=libretime_api.settings.testing
format: .format
lint: .format-check .pylint .mypy .bandit
test: .pytest
test-coverage: .coverage
clean: .clean
test: $(VENV)
$(VENV)/bin/pytest -v \
--numprocesses=$(CPU_CORES) \
--color=yes \
--cov-config=pyproject.toml \
--cov-report=term \
--cov-report=xml:./coverage.xml \
--cov=libretime_api \
libretime_api
SCHEMA_FILE ?= schema.yml
schema: $(VENV)
$(VENV)/bin/libretime-api spectacular --file $(SCHEMA_FILE)

View file

@ -36,7 +36,10 @@ log_cli_level = "DEBUG"
DJANGO_SETTINGS_MODULE = "libretime_api.settings.testing"
[tool.coverage.run]
plugins = ["django_coverage_plugin"]
source = ["libretime_api"]
omit = [
"*/migrations/*",
"*/tests/*",
]

View file

@ -35,6 +35,7 @@ setup(
"psycopg2>=2.8.6,<2.10",
],
"dev": [
"django-coverage-plugin",
"django-stubs",
"djangorestframework-stubs",
"model_bakery",