We have a CI server that automatically runs our tests. Everything works great except this morning a build was pushed up that when "phpunit" ran it hit some bad php syntax which exited the below execution chain so that artisan ci:cleanup
was never run.
php artisan ci:prepare
./vendor/bin/phpunit
php artisan ci:cleanup
The tail end of GitLab-CI's log output is below, showing that this parse error prevented the cleanup from running.
./vendor/bin/phpunit
PHP Parse error: syntax error, unexpected '<<' (T_SL) in /home/gitlab_ci_runner/gitlab-runners/gitlab-ci-runner/tmp/builds/project-9/app/lib/Tests/Shared/Controllers/Api/AuthTest.php on line 64
I'd prefer to avoid writing a bash file or something to handle execution/errors, but I still need for the output to show in GitLab-CI's logs as it normally does.
How should I best approach handling this kind of terminating error where it doesn't prevent the cleanup from running?