Allow stages to define jobs to be executed
Description
According to both the CI documentation and the YAML linter the stages:
section only accepts string labels.
It could make the YAML structure nicely readable if we were allowed to define a list of jobs in a stages:
subsection, which should be executed in specific stage.
Proposal
The following YAML should be valid. Each listed stage refers to a definition, which resembles a function in programming. No explicit stage:
is needed in such a "function".
image: some-docker-registry/some-docker-image
stages:
pre-requisites:
- npm_install
checks:
- phplint
- phpcs
- jscs
tests:
- phpunit
- grunt
grunt:
script:
- grunt test
jscs:
script:
- jscs -c .jscsrc --fix
phplint:
script:
- phplint
phpunit:
script:
- phpunit
...