-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (41 loc) · 1.64 KB
/
Makefile
File metadata and controls
51 lines (41 loc) · 1.64 KB
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
.PHONY: it
it: fix stan approve test validate-examples ## Run the commonly used targets
.PHONY: help
help: ## Displays this list of targets with descriptions
@grep --extended-regexp '^\.?[a-zA-Z0-9_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: setup
setup: vendor ## Set up the project
.PHONY: fix
fix: vendor
vendor/bin/php-cs-fixer fix
.PHONY: stan
stan: ## Runs static analysis with phpstan
mkdir --parents .build/phpstan
vendor/bin/phpstan analyse --configuration=phpstan.neon
.PHONY: test
test: ## Runs tests with phpunit
mkdir --parents .build/phpunit
vendor/bin/phpunit
.PHONY: coverage
coverage: ## Collects coverage from running unit tests with phpunit
mkdir --parents .build/phpunit
vendor/bin/phpunit --dump-xdebug-filter=.build/phpunit/xdebug-filter.php
vendor/bin/phpunit --coverage-text --prepend=.build/phpunit/xdebug-filter.php
.PHONY: approve
approve: ## Generate code and approve it as expected
tests/generate-and-approve-examples.php
.PHONY: validate-examples
validate-examples: ## Run integration tests on examples
examples/validate.sh custom-types --dependencies=highest
examples/validate.sh inline-fragments --dependencies=highest
examples/validate.sh input --dependencies=highest
examples/validate.sh install --dependencies=highest
examples/validate.sh php-keywords --dependencies=highest
examples/validate.sh polymorphic --dependencies=highest
examples/validate.sh simple --dependencies=highest
vendor: composer.json composer.lock
composer install
composer validate
composer normalize
composer.lock: composer.json
composer update