Created
May 13, 2019 19:25
-
-
Save fcschmidt/39a0f6418c83eafac122cca2e40a54f6 to your computer and use it in GitHub Desktop.
Makefile Django
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
.PHONY: test install pep8 clean | |
DB_NAME=db_name | |
test: | |
@echo 'Run coverage and starting tests' | |
@pytest --verbose --cov=app --color=yes tests/ | |
report: | |
@echo 'Report coverage and generate html' | |
coverage report | |
coverage html -d coverage_html | |
init: | |
@echo 'Create environment and Instal dependences' | |
@virtualenv -p python3.6 .venv | |
@source .venv/bin/activate | |
pip install --upgrade pip | |
pip install -r requirements.txt | |
migrate: | |
@echo 'Created Migrations' | |
python manage.py migrate | |
createdb: | |
@echo 'Create Data base (PostgreSQL Data Base)' | |
createdb $(DB_NAME) | |
@echo 'Data Base $(DB_NAME) Create Successfully' | |
dropdb: | |
@echo 'Drop Data base' | |
dropdb $(DB_NAME) | |
@echo 'Data Base $(DB_NAME) Delete Successfully' | |
run: | |
@echo 'Start application' | |
python manage.py runserver | |
clean: | |
rm -rf migrations .coverage coverage_html .pytest_cache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment