chore: update python tests target
This commit is contained in:
parent
34864b8623
commit
26a2c2dda0
13
api/Makefile
13
api/Makefile
|
@ -13,12 +13,21 @@ clean: .clean
|
||||||
|
|
||||||
test: $(VENV)
|
test: $(VENV)
|
||||||
source $(VENV)/bin/activate
|
source $(VENV)/bin/activate
|
||||||
DJANGO_SETTINGS_MODULE=libretime_api.settings.testing pytest -n $(CPU_CORES) --color=yes -v libretime_api
|
export DJANGO_SETTINGS_MODULE=libretime_api.settings.testing
|
||||||
|
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_FILE ?= schema.yml
|
||||||
schema: $(VENV)
|
schema: $(VENV)
|
||||||
source $(VENV)/bin/activate
|
source $(VENV)/bin/activate
|
||||||
DJANGO_SETTINGS_MODULE=libretime_api.settings.testing libretime-api spectacular --file $(SCHEMA_FILE)
|
export DJANGO_SETTINGS_MODULE=libretime_api.settings.testing
|
||||||
|
libretime-api spectacular --file $(SCHEMA_FILE)
|
||||||
if command -v npx > /dev/null; then npx prettier --write $(SCHEMA_FILE); fi
|
if command -v npx > /dev/null; then npx prettier --write $(SCHEMA_FILE); fi
|
||||||
|
|
||||||
schema-foreach-commit:
|
schema-foreach-commit:
|
||||||
|
|
|
@ -63,7 +63,13 @@ install: $(VENV)
|
||||||
.PHONY: .pytest
|
.PHONY: .pytest
|
||||||
.pytest: $(VENV)
|
.pytest: $(VENV)
|
||||||
source $(VENV)/bin/activate
|
source $(VENV)/bin/activate
|
||||||
pytest -n $(CPU_CORES) --color=yes -v --cov-report term --cov-report xml:./coverage.xml $(PYTEST_ARG)
|
pytest -v \
|
||||||
|
--numprocesses=$(CPU_CORES) \
|
||||||
|
--color=yes \
|
||||||
|
--cov-config=pyproject.toml \
|
||||||
|
--cov-report=term \
|
||||||
|
--cov-report=xml:./coverage.xml \
|
||||||
|
$(PYTEST_ARG)
|
||||||
|
|
||||||
.PHONY: .clean
|
.PHONY: .clean
|
||||||
.clean:
|
.clean:
|
||||||
|
|
Loading…
Reference in New Issue