-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (24 loc) · 1.05 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
current_user := $(shell id -u)
current_group := $(shell id -g)
BUILD_DIR := $(PWD)
COMPOSER_FLAGS :=
DOCKER_FLAGS := --interactive --tty
DOCKER_IMAGE := registry.gitlab.com/fun-tech/fundraising-frontend-docker
.PHONY: ci test phpunit cs stan composer
ci: test cs
test: phpunit
cs: phpcs stan
install-php: install
install:
docker run --rm $(DOCKER_FLAGS) --volume $(BUILD_DIR):/app -w /app --volume /tmp:/tmp --volume ~/.composer:/composer --user $(current_user):$(current_group) $(DOCKER_IMAGE):composer composer install $(COMPOSER_FLAGS)
update-php: update
update:
docker run --rm $(DOCKER_FLAGS) --volume $(BUILD_DIR):/app -w /app --volume /tmp:/tmp --volume ~/.composer:/composer --user $(current_user):$(current_group) $(DOCKER_IMAGE):composer composer update $(COMPOSER_FLAGS)
phpunit:
docker-compose run --rm app ./vendor/bin/phpunit
phpcs:
docker-compose run --rm app ./vendor/bin/phpcs
stan:
docker-compose run --rm app ./vendor/bin/phpstan analyse --level=9 --no-progress src/ tests/
fix-cs:
docker-compose run --rm app ./vendor/bin/phpcbf