We have configured a pipeline where we ran some unit tests for a PHP Laravel project which includes the below:
- step:
name: Unit tests
services:
- mysql
image: webdevops/php-nginx:8.2
script:
- composer install --no-interaction --optimize-autoloader --ignore-platform-reqs
- pecl install xdebug
- echo "extension=xdebug.so" >> /opt/docker/etc/php/php.ini && echo "zend_extension = xdebug" >> /opt/docker/etc/php/php.ini && echo "xdebug.mode=coverage" >> /opt/docker/etc/php/php.ini
- php artisan test --coverage-clover tests/reports/coverage/coverage.xml --configuration phpunit.xml
artifacts:
- tests/reports/coverage/**
Hello @Angelos Naoum ,
thank you for reaching out to the Community!
The way that pipelines identify if a step was successful or not is based on the exit code of the commands being executed. A command that exits with code zero indicates a successful step, while any exit code other than zero will make the step be considered as failed. What may be the case is the command you are executing is returning a non-zero exit code even when the tests are successful, making the pipeline understand it as a failure.
That being said, I see you have also opened a support ticket with us to report this issue, and one of my colleagues is already investigating the affected build. In this case, I would suggest focusing the discussion on the support ticket to avoid any confusion that may arise from discussing the same issue in multiple places.
If you feel comfortable, once the support ticket is resolved, feel free to share the solution here in the Community so other users facing similar issues can try the same solution :)
Thank you, @Angelos Naoum !
Patrik S
Running into the same issue here, finally able to run our tests in bitbuckets pipeline with the newly increased size, and now it turns out to always failing the step even when successful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jessey van Offeren ,
I would like to ask if you could please create a new question for your issue, providing details on the errors and your setup.
We generally encourage users to create a new question for their issue instead of posting on someone else’s question, because
1) the root cause and resolution may be different for each case
2) a question can become cluttered and difficult to follow if we try to troubleshoot multiple users’ issues in it.
Please feel free to let me know if you have any questions.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.