diff --git a/README.md b/README.md index 00567417..35b9fac4 100644 --- a/README.md +++ b/README.md @@ -633,5 +633,17 @@ class Sabberworm\CSS\CSSList\Document#4 (2) { ## Misc -* Legacy Support: The latest pre-PSR-0 version of this project can be checked with the `0.9.0` tag. -* Running Tests: To run all unit tests for this project, run `composer install` to install phpunit and use `./vendor/bin/phpunit`. +### Legacy Support + +The latest pre-PSR-0 version of this project can be checked with the `0.9.0` tag. + +### Running Tests + +To run all continuous integration (CI) checks for this project (including unit tests), +* run `composer install` to install the development dependencies managed with Composer; +* run `phive install` to install the development dependencies managed with PHIVE; + * [Installation of PHIVE](https://github.com/phar-io/phive?tab=readme-ov-file#getting-phive) +* run `composer ci` to run all static and dynamic CI checks. + +Details of other Composer scripts available (e.g. to run one specific CI check) are provided with `composer list`. + diff --git a/composer.json b/composer.json index 0e27aadf..e8423209 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,11 @@ }, "scripts": { "ci": [ - "@ci:static" + "@ci:static", + "@ci:dynamic" + ], + "ci:dynamic": [ + "@ci:tests" ], "ci:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix --dry-run -v --show-progress=dots --diff bin src tests", "ci:php:stan": "phpstan --no-progress --configuration=config/phpstan.neon", @@ -70,6 +74,11 @@ "@ci:php:fixer", "@ci:php:stan" ], + "ci:tests": [ + "@ci:tests:unit" + ], + "ci:tests:sof": "\"./vendor/bin/phpunit\" --stop-on-failure --do-not-cache-result", + "ci:tests:unit": "\"./vendor/bin/phpunit\" --do-not-cache-result", "fix:php": [ "@fix:php:fixer" ], @@ -77,10 +86,14 @@ "phpstan:baseline": "phpstan --configuration=config/phpstan.neon --generate-baseline=config/phpstan-baseline.neon" }, "scripts-descriptions": { - "ci": "Runs all dynamic and static code checks (i.e. currently, only the static checks).", + "ci": "Runs all dynamic and static code checks.", + "ci:dynamic": "Runs all dynamic code checks (i.e., currently, the unit tests).", "ci:php:fixer": "Checks the code style with PHP CS Fixer.", "ci:php:stan": "Checks the types with PHPStan.", "ci:static": "Runs all static code analysis checks for the code.", + "ci:tests": "Runs all dynamic tests (i.e., currently, the unit tests).", + "ci:tests:sof": "Runs the unit tests and stops at the first failure.", + "ci:tests:unit": "Runs all unit tests.", "fix:php": "Autofixes all autofixable issues in the PHP code.", "fix:php:fixer": "Fixes autofixable issues found by PHP CS Fixer.", "phpstan:baseline": "Updates the PHPStan baseline file to match the code."