Grep test doesn't fail

At line 491 of log you can see that I run this test:

docker run -d --name $HEROKU_APP_NAME -e "PORT=9876" -p 9876:9876 ${HEROKU_REGISTRY_IMAGE};
docker exec -it $HEROKU_APP_NAME php -i | grep "PHP Version => 7.4.5"
docker inspect -f {{.Config.Labels}} $HEROKU_APP_NAME
docker inspect -f {{.Config.Labels}} $HEROKU_APP_NAME | grep $VCS_REF

In detail, now PHP version is 7.4.6, so my grep doesn’t output nothing but Travis doesn’t fail. How can I rewrite it to expect fail on change version?

Github link of demo project:

Edit: I tried also move script under script test, but it doesn’t fail: line 589

By default, bash scripts will run to the end regardless of each command’s result. The exit code of the script is dictated by the last command. If you want to the script to fail when anything goes wrong, you need to set the errexit option: set -o errexit (or, equivalently, set -e).

Thank you very much!