Skip to content

Commit

Permalink
Update Makefile for contributors (#1297)
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed Jul 15, 2023
2 parents bfe6376 + 487576a commit 9677b3b
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions Makefile
Expand Up @@ -11,21 +11,33 @@ test: deps
.PHONY: apidocs
apidocs: docs/api/index.html

phpDocumentor.phar:
wget https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.0.0/phpDocumentor.phar
wget https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.0.0/phpDocumentor.phar.asc
phpDocumentor.phar:
wget https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.3.1/phpDocumentor.phar
wget https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.3.1/phpDocumentor.phar.asc

library_files=$(shell find library -name '*.php')
library_files=$(shell find src -name '*.php')
docs/api/index.html: vendor/composer/installed.json $(library_files) phpDocumentor.phar
php phpDocumentor.phar run -d library -t docs/api
docker run -it --rm -v $$PWD:/opt/mockery -w /opt/mockery ghcr.io/ghostwriter/php:8.1-pcov php phpDocumentor.phar run -d src -t docs/api

.PHONY: test-all
test-all: test-74 test-73
test-all: test-83 test-82 test-81 test-80 test-74

.PHONY: test-74
test-74: deps
docker run -it --rm -v "$$PWD":/opt/mockery -w /opt/mockery php:7.4-cli php vendor/bin/phpunit
docker run -it --rm -v $$PWD:/opt/mockery -w /opt/mockery ghcr.io/ghostwriter/php:7.4-pcov php vendor/bin/phpunit

.PHONY: test-73
test-73: deps
docker run -it --rm -v "$$PWD":/opt/mockery -w /opt/mockery php:7.3-cli php vendor/bin/phpunit
.PHONY: test-80
test-80: deps
docker run -it --rm -v $$PWD:/opt/mockery -w /opt/mockery ghcr.io/ghostwriter/php:8.0-pcov php vendor/bin/phpunit

.PHONY: test-81
test-81: deps
docker run -it --rm -v $$PWD:/opt/mockery -w /opt/mockery ghcr.io/ghostwriter/php:8.1-pcov php vendor/bin/phpunit

.PHONY: test-82
test-82: deps
docker run -it --rm -v $$PWD:/opt/mockery -w /opt/mockery ghcr.io/ghostwriter/php:8.2-pcov php vendor/bin/phpunit

.PHONY: test-83
test-83: deps
docker run -it --rm -v $$PWD:/opt/mockery -w /opt/mockery ghcr.io/ghostwriter/php:8.3-rc-pcov php vendor/bin/phpunit

0 comments on commit 9677b3b

Please sign in to comment.