forked from mockery/mockery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (40 loc) · 1.49 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
vendor/composer/installed.json: composer.json
composer install
.PHONY: deps
deps: vendor/composer/installed.json
.PHONY: test
test: deps
php vendor/bin/phpunit
.PHONY: apidocs
apidocs: docs/api/index.html
phpDocumentor.phar:
wget https://github.com/phpDocumentor/phpDocumentor2/releases/download/v3.0.0-alpha.2-nightly-gdff5545/phpDocumentor.phar
wget https://github.com/phpDocumentor/phpDocumentor2/releases/download/v3.0.0-alpha.2-nightly-gdff5545/phpDocumentor.phar.pubkey
library_files=$(shell find library -name '*.php')
docs/api/index.html: vendor/composer/installed.json $(library_files) phpDocumentor.phar
php phpDocumentor.phar run -d library -t docs/api
.PHONY: test-all
test-all: test-72 test-71 test-70 test-56
.PHONY: test-all-7
test-all-7: test-72 test-71 test-70
.PHONY: test-72
test-72: deps
docker run -it --rm -v "$$PWD":/opt/mockery -w /opt/mockery php:7.2-cli php vendor/bin/phpunit
.PHONY: test-71
test-71: deps
docker run -it --rm -v "$$PWD":/opt/mockery -w /opt/mockery php:7.1-cli php vendor/bin/phpunit
.PHONY: test-70
test-70: deps
docker run -it --rm -v "$$PWD":/opt/mockery -w /opt/mockery php:7.0-cli php vendor/bin/phpunit
.PHONY: test-56
test-56: build56
docker run -it --rm \
-v "$$PWD/library":/opt/mockery/library \
-v "$$PWD/tests":/opt/mockery/tests \
-v "$$PWD/phpunit.xml.dist":/opt/mockery/phpunit.xml \
-w /opt/mockery \
mockery_php56 \
php vendor/bin/phpunit
.PHONY: build56
build56:
docker build -t mockery_php56 -f "$$PWD/docker/php56/Dockerfile" .