-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile
60 lines (54 loc) · 1.63 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
PHP_VERSION ?= 8.0
PHP := docker-compose run --rm php-${PHP_VERSION}
php-version:
${PHP} php -v
cache-clear:
sudo rm -rfv coverage .phpunit.result.cache infection.log
docker-build:
docker-compose build
composer-install:
${PHP} composer install
composer-self-update:
${PHP} composer self-update
composer-update:
${PHP} composer update
composer-require:
${PHP} composer require ${PACKAGE}
composer-require-dev:
${PHP} composer require --dev ${PACKAGE}
test: test-phpunit test-infection qa-psalm
test-phpunit:
${PHP} php -v
${PHP} php vendor/bin/phpunit --coverage-text
test-phpunit-local:
php -v
php vendor/bin/phpunit --coverage-text
php vendor/bin/psalm --no-cache
php vendor/bin/infection
test-infection:
${PHP} php vendor/bin/infection -j2 --min-msi=80
travis:
# PHP_VERSION=5.3 make travis-job
PHP_VERSION=5.4 make travis-job
PHP_VERSION=5.5 make travis-job
PHP_VERSION=5.6 make travis-job
PHP_VERSION=7.0 make travis-job
PHP_VERSION=7.1 make travis-job
PHP_VERSION=7.2 make travis-job
PHP_VERSION=7.3 make travis-job
PHP_VERSION=7.4 make travis-job
PHP_VERSION=8.0 make travis-job
travis-job:
${PHP} composer update --no-plugins
${PHP} php -v
${PHP} php vendor/bin/phpunit
if ${PHP} php -r 'exit((int)(version_compare(PHP_VERSION, "7.1", ">=") === false));'; then \
${PHP} composer require --dev vimeo/psalm infection/infection; \
${PHP} vendor/bin/psalm --threads=1 --no-cache --shepherd --find-unused-psalm-suppress; \
${PHP} vendor/bin/infection; \
${PHP} composer remove --dev vimeo/psalm infection/infection; \
fi;
qa-psalm:
${PHP} php vendor/bin/psalm --no-cache
qa-psalm-suppressed:
grep -rn psalm-suppress src