chore: split test and coverage tasks
This commit is contained in:
parent
2ccd93299a
commit
14beb885a3
16 changed files with 37 additions and 21 deletions
12
api/Makefile
12
api/Makefile
|
@ -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)
|
||||
|
|
|
@ -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/*",
|
||||
]
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ setup(
|
|||
"psycopg2>=2.8.6,<2.10",
|
||||
],
|
||||
"dev": [
|
||||
"django-coverage-plugin",
|
||||
"django-stubs",
|
||||
"djangorestframework-stubs",
|
||||
"model_bakery",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue