The bash functionality of drupalci.yml is intended to do minor setup work. It is *not* intended to be a bash testing framework or anything resembling that. It is not desirable to place bash scripts into drupalci.yml and then rely on the exit codes of those scripts as evidence of build success or failure.
It is preferable to have these bash scripts execute within the context of phpunit, which frames them as a standard test, and give the results in a standard way, and is runnable in environments *other than* drupalci.