-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repo: maintenance update (makefile, editorconfig, codeception, codest…
…yle, coveralls)
- Loading branch information
Showing
11 changed files
with
45 additions
and
51 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
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,30 +1,31 @@ | ||
.PHONY: qa lint cs csf phpstan tests coverage | ||
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html | ||
|
||
all: | ||
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\033[0m\n\nTargets:\n"}' | ||
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' | ||
install: | ||
composer update | ||
|
||
# QA | ||
qa: phpstan cs | ||
|
||
qa: lint phpstan cs ## Check code quality - coding style and static analysis | ||
|
||
lint: ## Check PHP files syntax | ||
vendor/bin/linter src tests | ||
|
||
cs: ## Check PHP files coding style | ||
cs: | ||
ifdef GITHUB_ACTION | ||
vendor/bin/codesniffer -q --report=checkstyle src tests | cs2pr | ||
else | ||
vendor/bin/codesniffer src tests | ||
endif | ||
|
||
csf: ## Fix PHP files coding style | ||
csf: | ||
vendor/bin/codefixer src tests | ||
|
||
phpstan: ## Analyse code with PHPStan | ||
phpstan: | ||
vendor/bin/phpstan analyse -l max -c phpstan.neon src | ||
|
||
# Tests | ||
|
||
tests: ## Run all tests | ||
tests: | ||
vendor/bin/codecept build | ||
vendor/bin/codecept run --debug | ||
|
||
coverage: ## Generate code coverage in XML format | ||
phpdbg -qrr vendor/bin/phpunit tests --colors=always -c tests/coverage.xml | ||
coverage-clover: | ||
vendor/bin/codecept build | ||
phpdbg -qrr vendor/bin/codecept run --coverage-xml | ||
|
||
coverage-html: | ||
vendor/bin/codecept build | ||
phpdbg -qrr vendor/bin/codecept run --coverage-html |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/_helpers | ||
/_log | ||
/_output | ||
/_support | ||
/_temp |
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