Allow naming scripts parts for better error messages
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
Further details
In php you mostly use composer to install some dependencies you run mostly all scripts in the same job because uploading/download the composer vendor folder as artifacts or add the composer dependency folder as cache folder avoids not to add composer install to your script which will still block your ci to much for some scripts which just run a few seconds.
Proposal
What does success look like, and how can we measure that?
It should be possible to name some scripts inside the job e.g.:
e.g.:
php:
script:
dependency:
- php -i
- php-m
- composer --version
- composer install
php-cs: composer php-cs
php-stan: composer phpstan
lint-twig: composer lint-twig
lint-yaml: composer lint-yaml
security-check: composer security-check
phpunit:
- bin/adminconsole doctrine:database:create
- bin/adminconsole doctrine:schema:update --force
- composer schemavalidate
- composer phpunit
in the web-ui you should then see which subjobs really did fail (like the stages). The advantage is that the scripts are runned on the same machine and no upload download from artifacts or caches needed to be done.
Another solution would be something like sub stages:
stages:
php:
- php-cs
- php-stan
- lint-twig
- lint-yaml
- security-check
- phpunit
php:
script:
- composer --version
- composer install
php-cs:
script: composer php-cs
# ...
all sub stages needed then run on the same machine and can be parallel.