forked from CodiumTeam/setup-kata-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (30 loc) · 1015 Bytes
/
Makefile
File metadata and controls
39 lines (30 loc) · 1015 Bytes
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
.PHONY: tests dependencies coverage docker-build docker-tests docker-coverage
default:
@printf "$$HELP"
# Local commands
dependencies:
composer install
tests:
./vendor/bin/phpunit --color=always
coverage:
./vendor/bin/phpunit --coverage-text
# Docker commands
docker-build:
docker build -t php-docker-bootstrap .
@docker run --rm -v ${PWD}:/opt/project php-docker-bootstrap make dependencies
docker-tests:
@docker run --rm -v ${PWD}:/opt/project php-docker-bootstrap make tests
docker-coverage:
@docker run --rm -v ${PWD}:/opt/project php-docker-bootstrap make coverage
define HELP
# Local commands
- make dependencies\tInstall the dependencies using composer
- make tests\t\tRun the tests
- make coverage\t\tRun the code coverage
# Docker commands
- make docker-build\tCreates a PHP image with xdebug and install the dependencies
- make docker-tests\tRun the tests on docker
- make docker-coverage\tRun the code coverage
Please execute "make <command>". Example make help
endef
export HELP