Skip to content

Commit e17b2d3

Browse files
committed
[Composer] Added one command to run them all (checks)
1 parent 9b630a5 commit e17b2d3

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

composer.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,17 @@
123123
"check-rector": "php tools/extract-inline-php.php && rector process --dry-run --ansi",
124124
"check-yaml": "phpunit --group yaml",
125125
"phpunit": "phpunit --exclude-group=yaml",
126-
"yaml-update-baseline": "php tests/generate-yaml-baseline.php"
126+
"yaml-update-baseline": "php tests/generate-yaml-baseline.php",
127+
"composer-update": "[ -d vendor ] || composer update",
128+
"yarn-install": "[ -d node_modules ] || yarn install",
129+
"markdownlint": [
130+
"@yarn-install",
131+
"yarn markdownlint"
132+
],
133+
"test": [
134+
"@composer-update",
135+
"EXIT=0; composer check-cs || EXIT=1; composer phpstan || EXIT=1; composer deptrac || EXIT=1; composer check-rector || EXIT=1; composer markdownlint || EXIT=1; exit $EXIT"
136+
]
127137
},
128138
"scripts-descriptions": {
129139
"fix-cs": "Automatically fixes code style in all files",
@@ -133,7 +143,11 @@
133143
"fix-rector": "Automatically applies Rector refactoring to code samples and syncs back to Markdown",
134144
"check-rector": "Check for code refactoring opportunities",
135145
"check-yaml": "Run PHPUnit tests (YAML validation)",
136-
"yaml-update-baseline": "Regenerate tests/yaml-validation-baseline.yaml from current failures"
146+
"yaml-update-baseline": "Regenerate tests/yaml-validation-baseline.yaml from current failures",
147+
"composer-update": "Install composer dependencies if not already installed",
148+
"yarn-install": "Install yarn dependencies if not already installed",
149+
"markdownlint": "Run Markdownlint on all documentation files",
150+
"test": "Run all checks (CS-Fixer, PHPStan, Deptrac, Rector, Markdownlint, YAML checks), continuing past failures and reporting failure overall if any check failed"
137151
},
138152
"config": {
139153
"allow-plugins": false

0 commit comments

Comments
 (0)