-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·73 lines (53 loc) · 2.86 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
ROOT_DIR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SRC_DIR=$(ROOT_DIR)/src
BIN_DIR=$(ROOT_DIR)/bin
include .env
-include .env.local
.PHONY: tests
deps:
@echo "==> Installing dependencies"
@composer install
migrate: deps
@echo "==> Run migrations"
@php $(BIN_DIR)/console --no-ansi --no-interaction doctrine:migrations:migrate --env=$(APP_ENV)
fixtures:
@php $(BIN_DIR)/console --no-ansi --no-interaction doctrine:fixtures:load --env=$(APP_ENV)
run: migrate js_routing
php-fpm
js_deps:
yarn install
watch: js_deps
yarn watch
js_build: js_deps
yarn build
js_routing:
bin/console --env=$(APP_ENV) fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
up:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build
stop:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml stop
rebuild:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml build --no-cache --parallel
tests:
@php -dpcov.enabled=1 -dpcov.directory=src -dpcov.exclude="~vendor|tests|bin|src/DataFixtures|src/Servientrega~" -d memory_limit=-1 $(BIN_DIR)/phpunit -c $(ROOT_DIR)/phpunit.xml.dist --colors=never
ci_eslint:
docker-compose -f docker-compose.yml -f docker-compose.test.yml build node
docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm --no-deps node make js_deps
docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm --no-deps node yarn eslint
ci_tests:
docker-compose -f docker-compose.yml -f docker-compose.test.yml up -d --build app node postgres_test
docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm --no-deps app make migrate
docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm --no-deps app make js_routing
docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm --no-deps app make fixtures
docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm --no-deps node /bin/sh -c 'make js_deps && yarn dev'
docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm --no-deps app make tests
docker-compose -f docker-compose.yml -f docker-compose.test.yml down -v
release:
docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml run -e APP_ENV=prod -e APP_DEBUG=0 --rm --no-deps app composer --no-interaction install --prefer-dist --no-dev
docker-compose -f docker-compose.yml run -e APP_ENV=prod -e APP_DEBUG=0 --rm --no-deps app bin/console --env=prod fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
docker-compose -f docker-compose.yml run --rm --no-deps node make js_build
lint-code-style:
@ - vendor/bin/php-cs-fixer fix --config=.php_cs.dist --allow-risky=yes --dry-run --stop-on-violation --diff --using-cache=no src tests
fix-code-style:
@ - vendor/bin/php-cs-fixer fix --config=.php_cs.dist --allow-risky=yes --verbose --using-cache=no src tests