It would be amazing to be able to use lists in environment variables and have them be set to bash arrays. e.g.
command: do_tests "${TESTS[@]}"
environment:
TESTS:
# the main test file
- test_foo.py
# another test file
- test_bar.py
If the shell doesn't support arrays (e.g. 'sh'), they could be loaded as a comma-separated list. But being able to define lists annotated with YAML comments would make the command option much more succinct. Currently, one has to put the bash array into the command option, which bloats it with environment set up and makes it less clear what the actual command is, e.g.
command: |
TESTS=(
# the main test file
test_foo.py
# another test file
test_bar.py
)
do_tests "${TESTS[@]}"