forked from ArrowSphere/public-api-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (34 loc) · 1.91 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
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " test to perform unit tests"
@echo " coverage to perform unit tests with code coverage"
@echo " coverage-show to show the code coverage report"
@echo " static to run phpstan, psalm and php-cs-fixer on the codebase"
@echo " static-psalm to run psalm on the codebase"
@echo " static-psalm-update-baseline to regenerate the psalm baseline file"
@echo " static-phpstan to run phpstan on the codebase"
@echo " static-phpstan-update-baseline to regenerate the phpstan baseline file"
@echo " static-codestyle-fix to run php-cs-fixer on the codebase, writing the changes"
@echo " static-codestyle-check to run php-cs-fixer on the codebase"
@echo " static-psalm-generate-baseline to generate the psalm baseline"
test:
vendor/bin/phpunit
coverage:
vendor/bin/phpunit --coverage-html=build/artifacts/coverage
coverage-show:
open build/artifacts/coverage/index.html
static: static-phpstan static-psalm static-codestyle-check
static-psalm:
docker run --rm -it -e REQUIRE_DEV=true -e CHECK_PLATFORM_REQUIREMENTS=false -v ${PWD}:/app -w /app vimeo/psalm-github-actions $(PSALM_PARAMS)
static-psalm-generate-baseline:
$(MAKE) static-psalm PSALM_PARAMS="--set-baseline=psalm.baseline.xml"
static-psalm-update-baseline:
$(MAKE) static-psalm PSALM_PARAMS="--update-baseline"
static-phpstan:
docker run --rm -it -e REQUIRE_DEV=true -v ${PWD}:/app -w /app oskarstark/phpstan-ga:0.12.76 analyze $(PHPSTAN_PARAMS)
static-phpstan-update-baseline:
$(MAKE) static-phpstan PHPSTAN_PARAMS="--generate-baseline"
static-codestyle-fix:
docker run --rm -it -v ${PWD}:/app -w /app oskarstark/php-cs-fixer-ga:2.16.4 --diff-format udiff $(CS_PARAMS)
static-codestyle-check:
$(MAKE) static-codestyle-fix CS_PARAMS="--dry-run"