1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-11 19:14:38 +01:00
guzzle/Makefile

73 lines
2.5 KiB
Makefile
Raw Normal View History

2015-05-25 16:20:42 -07:00
help:
@echo "Please use \`make <target>' where <target> is one of"
2020-06-16 10:10:25 +01:00
@echo " start-server to start the test server"
@echo " stop-server to stop the test server"
@echo " test to perform unit tests. Provide TEST to perform a specific test."
@echo " coverage to perform unit tests with code coverage. Provide TEST to perform a specific test."
@echo " coverage-show to show the code coverage report"
@echo " clean to remove build artifacts"
@echo " docs to build the Sphinx docs"
@echo " docs-show to view the Sphinx docs"
@echo " static to run phpstan and php-cs-fixer on the codebase"
@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"
2015-02-24 22:50:52 -08:00
start-server: stop-server
node tests/server.js &> /dev/null &
./vendor/bin/http_test_server &> /dev/null &
stop-server:
2015-02-24 22:50:52 -08:00
@PID=$(shell ps axo pid,command \
| grep 'tests/server.js' \
| grep -v grep \
| cut -f 1 -d " "\
) && [ -n "$$PID" ] && kill $$PID || true
@PID=$(shell ps axo pid,command \
| grep 'vendor/bin/http_test_server' \
| grep -v grep \
| cut -f 1 -d " "\
) && [ -n "$$PID" ] && kill $$PID || true
test: start-server
2014-09-10 17:13:42 -07:00
vendor/bin/phpunit
$(MAKE) stop-server
coverage: start-server
2015-03-29 11:17:00 -07:00
vendor/bin/phpunit --coverage-html=build/artifacts/coverage
$(MAKE) stop-server
2015-05-25 16:20:42 -07:00
coverage-show: view-coverage
view-coverage:
2015-03-29 11:17:00 -07:00
open build/artifacts/coverage/index.html
clean:
rm -rf artifacts/*
2014-03-23 17:08:23 -07:00
docs:
cd docs && make html && cd ..
2015-05-25 16:20:42 -07:00
docs-show:
open docs/_build/html/index.html
static: static-phpstan static-psalm static-codestyle-check
static-psalm:
docker run --rm -it -v ${PWD}:/app -w /app vimeo/psalm-github-actions
static-phpstan:
docker run --rm -it -e REQUIRE_DEV=true -v ${PWD}:/app -w /app oskarstark/phpstan-ga:0.12.31 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.3.1 --diff-format udiff $(CS_PARAMS)
static-codestyle-check:
$(MAKE) static-codestyle-fix CS_PARAMS="--dry-run"
2020-06-16 10:10:25 +01:00
.PHONY: docs coverage-show view-coverage