-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
executable file
·52 lines (39 loc) · 1.68 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
default: help
export: ## Print export command
@echo "export REACT_APP_USERS_SERVICE_URL=http://localhost:5001"
help: ## Output available commands
@echo "Available commands:"
@echo
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
lint-client: ## Run Lint
@docker-compose exec client npm run lint
lint-prettier-check: ## Run Prettier:Check
@docker-compose exec client npm run prettier:check
lint-prettier-write: ## Run Prettier:Write
@docker-compose exec client npm run prettier:write
lint-users: ## Run Flake8, Black and iSort
@docker-compose exec users flake8 project
@echo "flake8 complete"
@docker-compose exec users black project
@docker-compose exec users /bin/sh -c "isort project/**/*.py"
@echo "lint and format complete"
postgres: ## Access db via psql
@echo "# \c users_dev"
@echo "# select * from users;"
@docker-compose exec users-db psql -U postgres
rebuild: ## Rebuild docker images
@docker-compose up -d --build
reseed: ## Recreate and Seed db
@docker-compose exec users python manage.py recreate_db
@docker-compose exec users python manage.py seed_db
start: ## Run a development environment
@docker-compose up -d
@docker-compose exec users python manage.py recreate_db
@docker-compose exec users python manage.py seed_db
test-all: ## Run the current test suite
@docker-compose exec users python -m pytest "project/tests" -p no:warnings
@docker-compose exec client npm test --coverage
test-client: ## Test frontend
@docker-compose exec client npm test --coverage
test-users: ## Test backend
@docker-compose exec users python -m pytest "project/tests" -p no:warnings