diff --git a/Makefile b/Makefile index 43702f7c..184232c5 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,11 @@ +RUNNING_CONTAINER := $(shell docker compose ps --services --filter "status=running" | grep django ) + test: - poetry run pytest src + @if [[ -n "${RUNNING_CONTAINER}" ]]; then \ + docker compose exec django poetry run pytest src/core src/users; \ + else \ + docker compose run --rm django poetry run pytest src/core src/users;\ + fi test-ui: poetry run pytest src/tests @@ -17,4 +23,7 @@ migrate: poetry run python src/manage.py migrate gen: - poetry run playwright codegen -b chromium --target python-pytest localhost:8000 \ No newline at end of file + poetry run playwright codegen -b chromium --target python-pytest localhost:8000 + +translate_es: + poetry run inv i18n -l es_ES