From 3c4dccc65ceefa19dffb7515f15e1f8455b6a6cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Fri, 1 Dec 2023 17:57:27 +0100 Subject: [PATCH] Maintenance: git, makefile, editorconfig --- .editorconfig | 2 +- .gitattributes | 7 +++---- .gitignore | 8 ++++++-- Makefile | 21 +++++++++++++-------- tests/.coveralls.yml | 4 ---- tests/.gitignore | 10 ---------- 6 files changed, 23 insertions(+), 29 deletions(-) delete mode 100644 tests/.coveralls.yml delete mode 100644 tests/.gitignore diff --git a/.editorconfig b/.editorconfig index a8286073..5e5b915a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,6 +11,6 @@ indent_style = tab indent_size = tab tab_width = 4 -[{*.json,*.yml,*.yaml,*.md}] +[*.{json,yaml,yml,md}] indent_style = space indent_size = 2 diff --git a/.gitattributes b/.gitattributes index 12910b67..ee08e845 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,11 +1,10 @@ -# Not archived .docs export-ignore -tests export-ignore +.github export-ignore .editorconfig export-ignore .gitattributes export-ignore .gitignore export-ignore -.travis.yml export-ignore Makefile export-ignore -phpstan.neon export-ignore README.md export-ignore +phpstan.neon export-ignore ruleset.xml export-ignore +tests export-ignore diff --git a/.gitignore b/.gitignore index b1b6f4d5..f0b3670c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,9 @@ /composer.lock # Tests -/temp -/coverage.xml +/tests/tmp +/coverage.* +/tests/**/*.log +/tests/**/*.html +/tests/**/*.expected +/tests/**/*.actual diff --git a/Makefile b/Makefile index 740e007c..33bc117b 100644 --- a/Makefile +++ b/Makefile @@ -1,29 +1,34 @@ -.PHONY: install qa cs csf phpstan tests coverage - +.PHONY: install install: composer update +.PHONY: qa qa: phpstan cs +.PHONY: cs cs: ifdef GITHUB_ACTION - vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --colors -nsp -q --report=checkstyle src tests | cs2pr + vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp -q --report=checkstyle src tests | cs2pr else - vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --colors -nsp src tests + vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests endif +.PHONY: csf csf: - vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --colors -nsp src tests + vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests +.PHONY: phpstan phpstan: vendor/bin/phpstan analyse -c phpstan.neon +.PHONY: tests tests: - vendor/bin/tester -s -p php --colors 1 -C -d memory_limit=512M tests/Cases + vendor/bin/tester -s -p php --colors 1 -C tests/Cases +.PHONY: coverage coverage: ifdef GITHUB_ACTION - vendor/bin/tester -s -p phpdbg --colors 1 -C -d memory_limit=512M --coverage coverage.xml --coverage-src src tests/Cases + vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases else - vendor/bin/tester -s -p phpdbg --colors 1 -C -d memory_limit=512M --coverage coverage.html --coverage-src src tests/Cases + vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.html --coverage-src src tests/Cases endif diff --git a/tests/.coveralls.yml b/tests/.coveralls.yml deleted file mode 100644 index 84503825..00000000 --- a/tests/.coveralls.yml +++ /dev/null @@ -1,4 +0,0 @@ -# for php-coveralls -service_name: github-actions -coverage_clover: coverage.xml -json_path: coverage.json diff --git a/tests/.gitignore b/tests/.gitignore deleted file mode 100644 index f0d3402c..00000000 --- a/tests/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# Folders - recursive -*.expected -*.actual - -# Folders -/tmp - -# Files -/*.log -/*.html