-
-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ddeboer/master
README.md: update instruction to build repo locally (#541)
- Loading branch information
Showing
13 changed files
with
61 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ vendor/ | |
composer.lock | ||
phpunit.xml | ||
wait-for-it | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,50 @@ | ||
PHP_DOCKER_VERSION := thecodingmachine/php:8.0-v4-cli | ||
PHP_BIN := docker run -it --rm \ | ||
--network=ddeboer_imap_network \ | ||
--env IMAP_SERVER_NAME=ddeboer_imap_server \ | ||
--env IMAP_SERVER_PORT=993 \ | ||
--env [email protected] \ | ||
--env IMAP_PASSWORD=p4ssword \ | ||
--env PHP_EXTENSION_IMAP=1 \ | ||
--env PHP_EXTENSION_PCOV=1 \ | ||
-v "$(PWD)":"$(PWD)" -w "$(PWD)" \ | ||
$(PHP_DOCKER_VERSION) | ||
|
||
all: csfix static-analysis test | ||
@echo "Done." | ||
|
||
vendor: composer.json | ||
composer update | ||
$(PHP_BIN) composer update | ||
touch vendor | ||
|
||
.PHONY: csfix | ||
csfix: vendor | ||
vendor/bin/php-cs-fixer fix --verbose | ||
$(PHP_BIN) vendor/bin/php-cs-fixer fix --verbose | ||
|
||
.PHONY: static-analysis | ||
static-analysis: vendor | ||
$(or ${PHP_BIN},php) vendor/bin/phpstan analyse | ||
$(PHP_BIN) vendor/bin/phpstan analyse | ||
|
||
wait-for-it: | ||
wget -O wait-for-it "https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh" | ||
chmod +x wait-for-it | ||
|
||
.PHONY: start-imap-server | ||
start-imap-server: wait-for-it | ||
docker run --name=ddeboer_imap_server --detach --rm --publish 10993:993 --env MAILNAME=test.test --env [email protected] --env MAIL_PASS=p4ssword antespi/docker-imap-devel:latest | ||
docker pull $(PHP_DOCKER_VERSION) | ||
docker pull antespi/docker-imap-devel:latest | ||
docker network create ddeboer_imap_network | ||
docker run \ | ||
--name=ddeboer_imap_server \ | ||
--network=ddeboer_imap_network \ | ||
--detach \ | ||
--rm \ | ||
--expose 993 \ | ||
--publish 10993:993 \ | ||
--env MAILNAME=test.test \ | ||
--env [email protected] \ | ||
--env MAIL_PASS=p4ssword \ | ||
antespi/docker-imap-devel:latest | ||
./wait-for-it localhost:10993 | ||
|
||
.PHONY: stop-imap-server | ||
|
@@ -28,4 +53,7 @@ stop-imap-server: | |
|
||
.PHONY: test | ||
test: vendor | ||
IMAP_SERVER_NAME=localhost IMAP_SERVER_PORT=10993 [email protected] IMAP_PASSWORD=p4ssword $(or ${PHP_BIN},php) -d zend.assertions=1 vendor/bin/phpunit ${arg} | ||
$(PHP_BIN) php \ | ||
-d zend.assertions=1 \ | ||
vendor/bin/phpunit \ | ||
$(PHPUNIT_FLAGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters