-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
somewhat fix phpunit so it could run functional tests again #396
Conversation
What does make sense is to add the functional tests to github workflow. |
I think we'd need sqlite support or something, I could be mistaken but I recall similar conversations about setting up dependencies and sqlite not supporting the specific postgres features we use. I think that can be out of scope for this, I'd just like to verify the functional tests work correctly with this change but am having trouble myself getting them to run, which probably isn't a good sign >.> making it possible in docker might be nice so system setup isn't a requirement, but again not putting that on asdfzdfj, just brainstorming ways to both learn myself how to run the tests and instruct others |
GitHub should allow us to use a PostgreSQL docker container as a dependency for a specific GitHub Action Job: https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers. Allowing us to just leverage PostgreSQL and run the tests in the same matter as you might do locally on your dev system. |
perhaps, I'm not familiar with how github workflow/ci works and it's a bit out of scope for this patch so feel free to make a patch doing that if you want to add this still, I'd recommended to not run the full tests all the time, as it's a really expensive operation, using quite a bit of memory and time (I had to raise my php mem limit to 1G for phpunit to not fail halfway due to running out memory, also it took about 22m to complete on my dinky R5 5600G machine), at the very least I'd like this to be run before cutting a new release so regression could be fixed before actually making a release |
be0ecda
to
b802ed2
Compare
who tests the test infrastructure not sure what happened but it seems to be a combination of: - symfony/phpunit-bridge doesn't support phpunit 10 yet - but we're using phpunit 10 anyway - applied multiple config recipes and overwritten a decent chunk out of them - dama/doctrine-test-bundle not active when running tests, leading to db error when testing due to data conflict and mismatch between tests data in db and what the tests sees and has access to included fixes: - applied a small phpunit config changes just enough to get it back up and running again - included auto test database bootstrap for phpunit, activate by setting BOOTSTRAP_DB env variable when starting tests (e.g. `BOOTSTRAP_DB=1 ./bin/phpunit`)
b802ed2
to
604fe7d
Compare
@asdfzdfj Follow up could be to briefly document the |
) who tests the test infrastructure not sure what happened but it seems to be a combination of: - symfony/phpunit-bridge doesn't support phpunit 10 yet - but we're using phpunit 10 anyway - applied multiple config recipes and overwritten a decent chunk out of them - dama/doctrine-test-bundle not active when running tests, leading to db error when testing due to data conflict and mismatch between tests data in db and what the tests sees and has access to included fixes: - applied a small phpunit config changes just enough to get it back up and running again - included auto test database bootstrap for phpunit, activate by setting BOOTSTRAP_DB env variable when starting tests (e.g. `BOOTSTRAP_DB=1 ./bin/phpunit`)
who tests the test infrastructure
not sure what happened but it seems to be a combination of:
included fixes:
BOOTSTRAP_DB=1 ./bin/phpunit
)