Skip to content

Commit a762f7e

Browse files
committed
[FEATURE] Add Composer scripts to run unit tests
This is the change to `composer.json` which was inadvertently omitted from #488.
1 parent c6b93a3 commit a762f7e

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

composer.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,38 @@
6262
},
6363
"scripts": {
6464
"ci": [
65-
"@ci:static"
65+
"@ci:static",
66+
"@ci:dynamic"
67+
],
68+
"ci:dynamic": [
69+
"@ci:tests"
6670
],
6771
"ci:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix --dry-run -v --show-progress=dots --diff bin src tests",
6872
"ci:php:stan": "phpstan --no-progress --configuration=config/phpstan.neon",
6973
"ci:static": [
7074
"@ci:php:fixer",
7175
"@ci:php:stan"
7276
],
77+
"ci:tests": [
78+
"@ci:tests:unit"
79+
],
80+
"ci:tests:sof": "\"./vendor/bin/phpunit\" --stop-on-failure --do-not-cache-result",
81+
"ci:tests:unit": "\"./vendor/bin/phpunit\" --do-not-cache-result",
7382
"fix:php": [
7483
"@fix:php:fixer"
7584
],
7685
"fix:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix bin src tests",
7786
"phpstan:baseline": "phpstan --configuration=config/phpstan.neon --generate-baseline=config/phpstan-baseline.neon"
7887
},
7988
"scripts-descriptions": {
80-
"ci": "Runs all dynamic and static code checks (i.e. currently, only the static checks).",
89+
"ci": "Runs all dynamic and static code checks.",
90+
"ci:dynamic": "Runs all dynamic code checks (i.e., currently, the unit tests).",
8191
"ci:php:fixer": "Checks the code style with PHP CS Fixer.",
8292
"ci:php:stan": "Checks the types with PHPStan.",
8393
"ci:static": "Runs all static code analysis checks for the code.",
94+
"ci:tests": "Runs all dynamic tests (i.e., currently, the unit tests).",
95+
"ci:tests:sof": "Runs the unit tests and stops at the first failure.",
96+
"ci:tests:unit": "Runs all unit tests.",
8497
"fix:php": "Autofixes all autofixable issues in the PHP code.",
8598
"fix:php:fixer": "Fixes autofixable issues found by PHP CS Fixer.",
8699
"phpstan:baseline": "Updates the PHPStan baseline file to match the code."

0 commit comments

Comments
 (0)