Closed thePanz closed 1 year ago
@thePanz I do not know GitHub actions environment, is it possible to execute tests//bin/test
?
GitHub actions environment is not controlled. We should not depend on an external service to dictate the test environment. More over, having a different environment during development and on CI is not good.
The CI is a detail, we should be able to change it without changing the test code.
apparently a running MySQL service is not needed to complete the tests
After removing db service on docker-compose, tests failed. So it seems that GitHub actions environment provide a mysql server.
db connection bad isolation
Indeed.
@alquerci feels weird that the GitHub Actions has a mysql service up and running.
All the current action is doing is cd tests && php run.php
, this is the same that is being done in tests//bin/test
In the meantime, do you check by runnning the current HEAD code from this repository that the changes are still working ok with your docker setup?
do you check by runnning the current HEAD code from this repository that the changes are still working ok with your docker setup?
Yes, that exactly what I do when I tested your hypothesis.
All green.
The Ubuntu22.04 image contains Mysql by default, but it need to be started https://github.com/actions/runner-images/blob/ubuntu22/20221119.2/images/linux/Ubuntu2204-Readme.md
Here the image install script which should disabled it in systemd https://github.com/actions/runner-images/blob/main/images/linux/scripts/installers/mysql.sh
I have tested the command on a fresh Ubuntu 22.04 and it stop and disable mysql,
And I'm unable to find into doctrine1 actions test scripts where the systemctl start mysql.service
is executed
I confirm, that some Doctrine1 Test, require mysql with : user:root password:password A random example : Doctrine_Ticket_1830_TestCase
But Mysql on Ubuntu22.04 use the plugin "auth_socket" which allow any connection from the socket, so without configuring any credentials, so Doctrine test with root:password works
Ubuntu images configure Mysql to root:root but it's pretty uselesss without changing the "auth_socket".
I have run the test on docker, all green too !
Thanks @Tybaze , maybe systemd is starting the service as soon the socket is used. I recall reading something like that for another service, but can't remember where nor any link to it.
So,
Poke @alquerci @Tybaze and @xNatek as you are the ones that mainly worked on the PHP v8.x compatibility
Notes: