Skip to content

Commit

Permalink
Improvements (#10)
Browse files Browse the repository at this point in the history
* unify Makefile

* upgrade PHPStan
  • Loading branch information
petrparolek committed Jan 6, 2022
1 parent 9e104d9 commit c4e5b41
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Expand Up @@ -256,7 +256,7 @@ jobs:
run: "${{ env.composer-install }}"

- name: "Tests"
run: "make coverage"
run: "make coverage-clover"

- name: "Coveralls.io"
env:
Expand Down
27 changes: 12 additions & 15 deletions Makefile
@@ -1,27 +1,24 @@
.PHONY: qa lint cs csf phpstan tests coverage
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html

all:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs
install:
composer update

vendor: composer.json composer.lock
composer install
qa: phpstan cs

qa: lint phpstan cs

lint: vendor
vendor/bin/linter src tests

cs: vendor
cs:
vendor/bin/codesniffer src tests

csf: vendor
csf:
vendor/bin/codefixer src tests

phpstan: vendor
phpstan:
vendor/bin/phpstan analyse -l max -c phpstan.neon src

tests: vendor
tests:
vendor/bin/tester -s -p php --colors 1 -C tests/cases

coverage: vendor
coverage-clover:
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests/cases

coverage-html:
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.html --coverage-src ./src tests/cases
8 changes: 4 additions & 4 deletions composer.json
Expand Up @@ -30,10 +30,10 @@
"nette/tester": "^2.4",
"ninjify/nunjuck": "^0.3.0",
"ninjify/qa": "^0.12",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpstan/phpstan-nette": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-nette": "^1.0",
"phpstan/phpstan-strict-rules": "^1.0",
"symfony/translation": "^5.0"
},
"autoload": {
Expand Down

0 comments on commit c4e5b41

Please sign in to comment.