Makefile 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. vendor/composer/installed.json: composer.json
  2. composer install
  3. .PHONY: deps
  4. deps: vendor/composer/installed.json
  5. .PHONY: test
  6. test: deps
  7. php vendor/bin/phpunit
  8. .PHONY: apidocs
  9. apidocs: docs/api/index.html
  10. library_files=$(shell find library -name '*.php')
  11. docs/api/index.html: vendor/composer/installed.json $(library_files)
  12. vendor/bin/phpdoc -d library -t docs/api
  13. .PHONY: test-all
  14. test-all: test-72 test-71 test-70 test-56
  15. .PHONY: test-all-7
  16. test-all-7: test-72 test-71 test-70
  17. .PHONY: test-72
  18. test-72: deps
  19. docker run -it --rm -v "$$PWD":/opt/mockery -w /opt/mockery php:7.2-cli php vendor/bin/phpunit
  20. .PHONY: test-71
  21. test-71: deps
  22. docker run -it --rm -v "$$PWD":/opt/mockery -w /opt/mockery php:7.1-cli php vendor/bin/phpunit
  23. .PHONY: test-70
  24. test-70: deps
  25. docker run -it --rm -v "$$PWD":/opt/mockery -w /opt/mockery php:7.0-cli php vendor/bin/phpunit
  26. .PHONY: test-56
  27. test-56: build56
  28. docker run -it --rm \
  29. -v "$$PWD/library":/opt/mockery/library \
  30. -v "$$PWD/tests":/opt/mockery/tests \
  31. -v "$$PWD/phpunit.xml.dist":/opt/mockery/phpunit.xml \
  32. -w /opt/mockery \
  33. mockery_php56 \
  34. php vendor/bin/phpunit
  35. .PHONY: build56
  36. build56:
  37. docker build -t mockery_php56 -f "$$PWD/docker/php56/Dockerfile" .