Skip to content

Instantly share code, notes, and snippets.

@fcschmidt
Last active August 21, 2019 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fcschmidt/fc5a5cd9051179cae51ea0903032fb85 to your computer and use it in GitHub Desktop.
Save fcschmidt/fc5a5cd9051179cae51ea0903032fb85 to your computer and use it in GitHub Desktop.
# Makefile for start testing
# Used for capture container id: docker ps -aqf "name=example-api"
#
container_name = exampple-api # docker ps for view container name
container_id := $(shell docker ps -aqf "name=$(container_name)")
folder_name = example-api
manage_path = $(folder_name)/django/app/manage.py
app_test = app-example.tests.tests_models
test:
docker exec -it $(container_id) su -c "TRAVIS=1 python /$(manage_path) test $(app_test) --settings=settings.test"
makemigrations:
docker exec -it $(container_id) su -c "TRAVIS=1 python /$(manage_path) makemigrations --settings=settings.local"
shell:
docker exec -it $(container_id) su -c "python /$(manage_path) shell --settings=setting$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment