Last active
August 21, 2019 16:57
-
-
Save fcschmidt/fc5a5cd9051179cae51ea0903032fb85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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