-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tools and use make to run them
- Loading branch information
Showing
8 changed files
with
703 additions
and
781 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 |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
strategy: | ||
matrix: | ||
php-version: | ||
- 8.0 | ||
- 8.1 | ||
|
||
steps: | ||
- name: "Checkout" | ||
|
@@ -28,12 +28,9 @@ jobs: | |
uses: shivammathur/[email protected] | ||
with: | ||
coverage: none | ||
extensions: "mbstring, json" | ||
extensions: "mbstring" | ||
php-version: ${{ matrix.php-version }} | ||
|
||
- name: "Validate composer.json and composer.lock" | ||
run: composer validate --strict | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -45,8 +42,8 @@ jobs: | |
- name: "Install locked dependencies with composer" | ||
run: composer install --no-interaction --no-progress --no-suggest | ||
|
||
- name: "Run localheinz/composer-normalize" | ||
run: composer normalize --dry-run | ||
- name: "Run composer lint" | ||
run: make lint-composer | ||
|
||
- name: "Create cache directory for friendsofphp/php-cs-fixer" | ||
run: mkdir -p .build/php-cs-fixer | ||
|
@@ -60,7 +57,9 @@ jobs: | |
php${{ matrix.php-version }}-php-cs-fixer- | ||
- name: "Run friendsofphp/php-cs-fixer" | ||
run: composer cs-diff | ||
env: | ||
PHP_CS_FIXER_IGNORE_ENV: 1 | ||
run: make cs | ||
|
||
static-code-analysis: | ||
name: "Static Code Analysis" | ||
|
@@ -80,7 +79,7 @@ jobs: | |
uses: shivammathur/[email protected] | ||
with: | ||
coverage: none | ||
extensions: "mbstring, json" | ||
extensions: "mbstring" | ||
php-version: ${{ matrix.php-version }} | ||
|
||
- name: "Cache dependencies installed with composer" | ||
|
@@ -95,13 +94,13 @@ jobs: | |
run: composer install --no-interaction --no-progress --no-suggest | ||
|
||
- name: "Run phpstan/phpstan" | ||
run: composer phpstan | ||
run: make phpstan | ||
|
||
- name: "Run psalm" | ||
run: vendor/bin/psalm --config=psalm.xml --diff --shepherd --show-info=false --stats --threads=4 | ||
run: make psalm | ||
|
||
- name: "Run phpmd" | ||
run: composer phpmd | ||
run: make phpmd | ||
|
||
tests: | ||
name: "Test (PHP ${{ matrix.php-version }}, symfony ${{ matrix.symfony }}, ${{ matrix.dependencies }})" | ||
|
@@ -130,11 +129,12 @@ jobs: | |
uses: shivammathur/[email protected] | ||
with: | ||
coverage: none | ||
extensions: "mbstring, json" | ||
extensions: "mbstring" | ||
php-version: ${{ matrix.php-version }} | ||
|
||
- name: 'Install Symfony Flex' | ||
run: composer global require --prefer-dist --no-progress --no-suggest --ansi symfony/flex | ||
run: | | ||
composer global require --prefer-dist --no-progress --no-suggest --ansi symfony/flex | ||
- name: "Cache dependencies installed with composer" | ||
uses: actions/[email protected] | ||
|
@@ -156,7 +156,7 @@ jobs: | |
run: composer update --no-interaction --no-progress --no-suggest | ||
|
||
- name: "Run tests with phpunit/phpunit" | ||
run: composer test | ||
run: make test | ||
|
||
code-coverage: | ||
name: "Code Coverage" | ||
|
@@ -176,7 +176,7 @@ jobs: | |
uses: shivammathur/[email protected] | ||
with: | ||
coverage: pcov | ||
extensions: "mbstring, json" | ||
extensions: "mbstring" | ||
php-version: ${{ matrix.php-version }} | ||
|
||
- name: "Cache dependencies installed with composer" | ||
|
@@ -191,7 +191,7 @@ jobs: | |
run: composer install --no-interaction --no-progress --no-suggest | ||
|
||
- name: "Collect code coverage with pcov and phpunit/phpunit" | ||
run: composer coverage | ||
run: make coverage | ||
|
||
- name: "Send code coverage report to Codecov.io" | ||
env: | ||
|
@@ -206,7 +206,7 @@ jobs: | |
strategy: | ||
matrix: | ||
php-version: | ||
- 8.1 | ||
- 8.0 | ||
|
||
steps: | ||
- name: "Checkout" | ||
|
@@ -230,8 +230,5 @@ jobs: | |
- name: "Install locked dependencies with composer" | ||
run: composer install --no-interaction --no-progress --no-suggest | ||
|
||
- name: "Download infection" | ||
run: wget -O infection https://github.com/infection/infection/releases/download/0.19.0/infection.phar && chmod +x infection | ||
|
||
- name: "Run mutation tests with pcov and infection/infection" | ||
run: ./infection | ||
run: make infection |
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,64 @@ | ||
.PHONY: default | ||
default: lint | ||
|
||
.PHONY: fix | ||
fix: cs-fix lint-fix | ||
|
||
.PHONY: lint | ||
lint: lint-composer | ||
|
||
.PHONY: lint-composer | ||
lint-composer: | ||
composer validate --strict | ||
composer normalize --dry-run | ||
|
||
.PHONY: test | ||
test: vendor-bin/tools/vendor | ||
vendor/bin/phpunit --colors=always | ||
|
||
.PHONY: infection | ||
infection: vendor/bin/infection | ||
vendor/bin/infection --threads=4 | ||
|
||
.PHONY: coverage | ||
coverage: vendor-bin/tools/vendor | ||
vendor/bin/phpunit --colors=always --coverage-clover=build/logs/clover.xml | ||
|
||
.PHONY: cs | ||
cs: vendor-bin/tools/vendor | ||
vendor/bin/php-cs-fixer fix --verbose --diff --dry-run | ||
|
||
.PHONY: cs-fix | ||
cs-fix: vendor-bin/tools/vendor | ||
vendor/bin/php-cs-fixer fix --verbose | ||
|
||
.PHONY: psalm | ||
psalm: vendor-bin/tools/vendor | ||
vendor/bin/psalm --config=psalm.xml --diff --shepherd --show-info=false --stats --threads=4 | ||
|
||
.PHONY: phpstan | ||
phpstan: vendor-bin/tools/vendor | ||
vendor/bin/phpstan analyse | ||
|
||
.PHONY: phpmd | ||
phpmd: vendor-bin/tools/vendor | ||
vendor/bin/phpmd src,tests ansi phpmd.xml | ||
|
||
.PHONY: lint-fix | ||
lint-fix: | ||
find ./src \\( -name '*.xml' -or -name '*.xml.dist' -or -name '*.xlf' \\) -type f -exec xmllint --encode UTF-8 --output '{}' --format '{}' \\; | ||
find ./src \\( -name '*.yml' -or -name '*.yaml' \\) -not -path '*/vendor/*' | xargs yaml-lint | ||
|
||
.PHONY: check-dependencies | ||
check-dependencies: vendor-bin/tools/vendor | ||
vendor/bin/composer-require-checker check --config-file composer-require.json composer.json | ||
|
||
# | ||
# Installation tasks | ||
# | ||
|
||
vendor-bin/tools/vendor: | ||
composer --working-dir=vendor-bin/tools install | ||
|
||
vendor/bin/infection: vendor-bin/tools/vendor | ||
wget -O vendor/bin/infection https://github.com/infection/infection/releases/latest/download/infection.phar && chmod +x vendor/bin/infection |
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,7 +1,8 @@ | ||
{ | ||
"name": "nucleos/allinkl-bundle", | ||
"type": "symfony-bundle", | ||
"description": "This bundle provides services for using the All-Inkl API inside symfony applications.", | ||
"license": "MIT", | ||
"type": "symfony-bundle", | ||
"keywords": [ | ||
"symfony", | ||
"bundle", | ||
|
@@ -10,14 +11,31 @@ | |
"sonata-block", | ||
"api" | ||
], | ||
"homepage": "https://nucleos.rocks", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Christian Gripp", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"homepage": "https://nucleos.rocks", | ||
"funding": [ | ||
{ | ||
"type": "github", | ||
"url": "https://github.com/sponsors/core23" | ||
}, | ||
{ | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/core23" | ||
}, | ||
{ | ||
"type": "ko-fi", | ||
"url": "https://ko-fi.com/core23" | ||
}, | ||
{ | ||
"type": "other", | ||
"url": "https://donate.core23.de" | ||
} | ||
], | ||
"require": { | ||
"php": "^8.0", | ||
"ext-json": "*", | ||
|
@@ -48,14 +66,6 @@ | |
"ergebnis/composer-normalize": "^2.0.1", | ||
"symfony/browser-kit": "^4.4 || ^5.0" | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"extra": { | ||
"unused": [ | ||
"twig/intl-extra" | ||
] | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Nucleos\\AllInklBundle\\": "src/" | ||
|
@@ -66,42 +76,20 @@ | |
"Nucleos\\AllInklBundle\\Tests\\": "tests/" | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"extra": { | ||
"unused": [ | ||
"twig/intl-extra" | ||
] | ||
}, | ||
"scripts": { | ||
"post-install-cmd": [ | ||
"@composer bin all install --ansi" | ||
], | ||
"post-update-cmd": [ | ||
"@composer bin all install --ansi" | ||
], | ||
"coverage": "vendor/bin/phpunit --colors=always --coverage-clover=build/logs/clover.xml", | ||
"cs": "PHP_CS_FIXER_IGNORE_ENV=1 && vendor/bin/php-cs-fixer fix --verbose", | ||
"cs-diff": "PHP_CS_FIXER_IGNORE_ENV=1 && vendor/bin/php-cs-fixer fix --verbose --diff --dry-run", | ||
"deps": "vendor/bin/composer-require-checker check --config-file composer-require.json composer.json", | ||
"infection": "vendor/bin/infection", | ||
"lint": [ | ||
"find ./src \\( -name '*.xml' -or -name '*.xml.dist' -or -name '*.xlf' \\) -type f -exec xmllint --encode UTF-8 --output '{}' --format '{}' \\;", | ||
"find ./src \\( -name '*.yml' -or -name '*.yaml' \\) -not -path '*/vendor/*' | xargs yaml-lint" | ||
], | ||
"phpmd": "vendor/bin/phpmd src,tests ansi phpmd.xml", | ||
"phpstan": "vendor/bin/phpstan analyse", | ||
"test": "vendor/bin/phpunit --colors=always" | ||
}, | ||
"funding": [ | ||
{ | ||
"type": "github", | ||
"url": "https://github.com/sponsors/core23" | ||
}, | ||
{ | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/core23" | ||
}, | ||
{ | ||
"type": "ko-fi", | ||
"url": "https://ko-fi.com/core23" | ||
}, | ||
{ | ||
"type": "other", | ||
"url": "https://donate.core23.de" | ||
} | ||
] | ||
] | ||
} | ||
} |
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,28 +1,28 @@ | ||
{ | ||
"name": "nucleos/dev-tools", | ||
"type": "project", | ||
"description": "Development tools that do not conflict the project dependencies", | ||
"type": "project", | ||
"require-dev": { | ||
"friendsofphp/php-cs-fixer": "^3.0", | ||
"jangregor/phpstan-prophecy": "^0.8", | ||
"maglnet/composer-require-checker": "^2.0", | ||
"matthiasnoback/symfony-dependency-injection-test": "^4.0", | ||
"phpmd/phpmd": "^2.9", | ||
"phpspec/prophecy-phpunit": "^2.0", | ||
"friendsofphp/php-cs-fixer": "^3.3", | ||
"maglnet/composer-require-checker": "^3.5", | ||
"matthiasnoback/symfony-dependency-injection-test": "^4.3", | ||
"phpmd/phpmd": "^2.10", | ||
"phpstan/extension-installer": "^1.0", | ||
"phpstan/phpstan": "^0.12", | ||
"phpstan/phpstan-phpunit": "^0.12", | ||
"phpstan/phpstan-strict-rules": "^0.12", | ||
"phpstan/phpstan-symfony": "^0.12", | ||
"phpunit/phpunit": "^8.5 || ^9.0", | ||
"phpstan/phpstan": "^1.0", | ||
"phpstan/phpstan-doctrine": "^1.0", | ||
"phpstan/phpstan-phpunit": "^1.0", | ||
"phpstan/phpstan-strict-rules": "^1.0", | ||
"phpstan/phpstan-symfony": "^1.0", | ||
"phpunit/phpunit": "^9.5", | ||
"psalm/plugin-phpunit": "^0.16", | ||
"psalm/plugin-symfony": "^3.0", | ||
"symfony/phpunit-bridge": "^5.1", | ||
"vimeo/psalm": "^4.3.1" | ||
"symfony/phpunit-bridge": "^6.0", | ||
"vimeo/psalm": "^4.13" | ||
}, | ||
"config": { | ||
"bin-dir": "../../vendor/bin", | ||
"platform": { | ||
"php": "8.0" | ||
"php": "8.0.2" | ||
} | ||
} | ||
} |
Oops, something went wrong.