Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d11bae6
commit 738ddff
Showing
50 changed files
with
612 additions
and
590 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
* text=auto | ||
|
||
/.github export-ignore | ||
/tests export-ignore | ||
/*.md export-ignore | ||
/LICENSE* export-ignore | ||
/.* export-ignore | ||
/phpunit.xml export-ignore | ||
/.github export-ignore | ||
/tests export-ignore | ||
/[Dd]ocker* export-ignore | ||
/CODE_OF_CONDUCT.md export-ignore | ||
/CONTRIBUTING.md export-ignore | ||
/.* export-ignore | ||
/phpunit.xml* export-ignore | ||
/phpstan.* export-ignore | ||
/Makefile export-ignore |
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @link <https://help.github.com/en/articles/about-code-owners> | ||
|
||
* @tarampampam |
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM composer:1.8.6 AS composer | ||
|
||
FROM php:7.1.3-alpine | ||
|
||
ENV \ | ||
COMPOSER_ALLOW_SUPERUSER="1" \ | ||
COMPOSER_HOME="/tmp/composer" | ||
|
||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
|
||
RUN set -xe \ | ||
&& apk add --no-cache binutils git curl \ | ||
&& apk add --no-cache --virtual .build-deps autoconf pkgconf make g++ gcc \ | ||
# install xdebug (for testing with code coverage), but not enable it | ||
&& pecl install xdebug-2.7.2 \ | ||
&& apk del .build-deps \ | ||
&& mkdir /src ${COMPOSER_HOME} \ | ||
&& composer global require 'hirak/prestissimo' --no-interaction --no-suggest --prefer-dist \ | ||
&& ln -s /usr/bin/composer /usr/bin/c \ | ||
&& chmod -R 777 ${COMPOSER_HOME} \ | ||
&& composer --version \ | ||
&& php -v \ | ||
&& php -m | ||
|
||
WORKDIR /src | ||
|
||
VOLUME ["/src"] |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/make | ||
# Makefile readme (ru): <http://linux.yaroslavl.ru/docs/prog/gnu_make_3-79_russian_manual.html> | ||
# Makefile readme (en): <https://www.gnu.org/software/make/manual/html_node/index.html#SEC_Contents> | ||
|
||
dc_bin := $(shell command -v docker-compose 2> /dev/null) | ||
|
||
SHELL = /bin/sh | ||
RUN_APP_ARGS = --rm --user "$(shell id -u):$(shell id -g)" app | ||
|
||
.PHONY : help build latest install lowest test test-cover shell clean | ||
.DEFAULT_GOAL : help | ||
|
||
# This will output the help for each task. thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html | ||
help: ## Show this help | ||
@printf "\033[33m%s:\033[0m\n" 'Available commands' | ||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | ||
|
||
build: ## Build docker images, required for current package environment | ||
$(dc_bin) build | ||
|
||
latest: clean ## Install latest php dependencies | ||
$(dc_bin) run $(RUN_APP_ARGS) composer update -n --ansi --no-suggest --prefer-dist --prefer-stable | ||
|
||
install: clean ## Install regular php dependencies | ||
$(dc_bin) run $(RUN_APP_ARGS) composer update -n --prefer-dist --no-interaction --no-suggest | ||
|
||
lowest: clean ## Install lowest php dependencies | ||
$(dc_bin) run $(RUN_APP_ARGS) composer update -n --ansi --no-suggest --prefer-dist --prefer-lowest | ||
|
||
test: ## Execute php tests and linters | ||
$(dc_bin) run $(RUN_APP_ARGS) composer test | ||
|
||
test-cover: ## Execute php tests with coverage | ||
$(dc_bin) run --rm --user "0:0" app sh -c 'docker-php-ext-enable xdebug && su $(shell whoami) -s /bin/sh -c "composer phpunit-cover"' | ||
|
||
shell: ## Start shell into container with php | ||
$(dc_bin) run -e "PS1=\[\033[1;32m\]\[\033[1;36m\][\u@docker] \[\033[1;34m\]\w\[\033[0;35m\] \[\033[1;36m\]# \[\033[0m\]" \ | ||
$(RUN_APP_ARGS) sh | ||
|
||
clean: ## Remove all dependencies and unimportant files | ||
-rm -Rf ./composer.lock ./vendor ./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
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
Oops, something went wrong.