Guest User

Untitled

a guest
Aug 25th, 2019
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Makefile for start testing
  2. # Used for capture container id: docker ps -aqf "name=example-api"
  3. #
  4. container_name = exampple-api # docker ps for view container name
  5. container_id := $(shell docker ps -aqf "name=$(container_name)")
  6. folder_name = example-api
  7. manage_path = $(folder_name)/django/app/manage.py
  8. app_test = app-example.tests.tests_models
  9.  
  10. test:
  11. docker exec -it $(container_id) su -c "TRAVIS=1 python /$(manage_path) test $(app_test) --settings=settings.test"
  12.  
  13. makemigrations:
  14. docker exec -it $(container_id) su -c "TRAVIS=1 python /$(manage_path) makemigrations --settings=settings.local"
  15.  
  16. shell:
  17. docker exec -it $(container_id) su -c "python /$(manage_path) shell --settings=setting$
RAW Paste Data