Closed nikophil closed 7 months ago
The non-dama tests we run on every permutation that includes a database is really slow... wondering how we can speed this up, only run on a single permutation? Maybe the code coverage job?
ok, this is a simple solution to not mess with a more complex matrix, and even test one permutation with dama. Done ✅
We're no longer testing with migrations, this would need the auto-generate migrations before the test system I have in foundry-next
migrations are tested in ORMDatabaseResetterTest
and WithMigrationTest
By the way, I was surprised that in foundry-next
, you were running two whole test suites on all permutation in order to test migration, is it really needed? :thinking:
The reset mode does not change the whole behavior of foundry, I don't think it deserves all this CI time!?
Hey!
I think this PR is almost ready (minus your future comments :sweat_smile:)
I think having ONE test (ie: WithMigrationTest
) which uses ResetDatabase
with migrations should be OK. One other test is also directly testing the reset database behavior: ORMDatabaseResetterTest
I've used your technique which uses bin/console
and which generates automatically the migrations, I think it is pretty cool.
In order not to generate a migration each time tests are started locally, I've conditioned it with an env var TEST_MIGRATIONS
which I've enabled in the CI The migration works as well with mysql or postgres.
I re-added it in the matrix, I think it is important to run the tests without dama at least once with postgre and once with mysql. Moreover ORMDatabaseResetterTest
cannot run with dama and we want to test this.
I've also used dama in the test coverage job in order to speed it up a little bit
I think code coverage fails because we're computing it with Foundry's bundle deactivated :shrug:
I'm good to go here.
I think code coverage fails because we're computing it with Foundry's bundle deactivated 🤷
Should the coverage job run the test suite 3 times (capturing/uploading a separate coverage.xml for each):
Some thoughts: