Skip to content

Commit

Permalink
Update makefile to run tests inside containers
Browse files Browse the repository at this point in the history
  • Loading branch information
Administrator committed May 9, 2024
1 parent 79d3d2f commit 6015936
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -17,4 +23,7 @@ migrate:
poetry run python src/manage.py migrate

gen:
poetry run playwright codegen -b chromium --target python-pytest localhost:8000
poetry run playwright codegen -b chromium --target python-pytest localhost:8000

translate_es:
poetry run inv i18n -l es_ES

0 comments on commit 6015936

Please sign in to comment.