-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
50 lines (40 loc) · 1.36 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
dockerfile = ci/test/php$(PHP_VERSION)/Dockerfile
image = util-test:php$(PHP_VERSION)
workdir = ${shell pwd}
uid = ${shell id -u}
test-install: check-PHP_VERSION
docker build -t $(image) --build-arg uid=$(uid) -f $(dockerfile) .
docker run --rm -v $(workdir):/app -e GITHUB_TOKEN $(image) composer-install
test-run: check-PHP_VERSION
ifdef CODE_COVERAGE
docker run --rm -v $(workdir):/app $(image) /app/vendor/bin/phpunit --coverage-clover clover.xml
else
docker run --rm -v $(workdir):/app $(image) /app/vendor/bin/phpunit
endif
check-%:
${if $($(*)), , ${error $(*) undefined}}
# Shortcuts
test-php55: export PHP_VERSION=5.5
test-php55:
make -i --no-print-directory test-install
make -i --no-print-directory test-run
test-php56: export PHP_VERSION=5.6
test-php56:
make -i --no-print-directory test-install
make -i --no-print-directory test-run
test-php70: export PHP_VERSION=7.0
test-php70:
make -i --no-print-directory test-install
make -i --no-print-directory test-run
test-php71: export PHP_VERSION=7.1
test-php71:
make -i --no-print-directory test-install
make -i --no-print-directory test-run
test-php72: export PHP_VERSION=7.2
test-php72:
make -i --no-print-directory test-install
make -i --no-print-directory test-run
test-php73: export PHP_VERSION=7.3
test-php73:
make -i --no-print-directory test-install
make -i --no-print-directory test-run