impact-graph
impact-graph copied to clipboard
CI/CD duration time has increased from 15 min to 30 min because of admin js test cases
We should find a way to run admin test cases parallel ( as they don't have any DB call or something it would not make a problem to make them parallel) to decrease CI/CD time. we have about 1.5 k test cases for admin permissions to cover all roles and permissions)
@jainkrati can you specify priority for this issue?
Hey @CarlosQ96, here is what I mentioned on the call, I noticed this beforeEach is running in root block which adding more time while running all the test cases since it's running before every test case https://github.com/Giveth/impact-graph/blob/e821acb7b0dbdbb5056d652584e79ca5ed29b127/src/repositories/previousRoundRankRepository.test.ts#L47-L54
Hey @CarlosQ96, here is what I mentioned on the call, I noticed this beforeEach is running in root block which adding more time while running all the test cases since it's running before every test case
https://github.com/Giveth/impact-graph/blob/e821acb7b0dbdbb5056d652584e79ca5ed29b127/src/repositories/previousRoundRankRepository.test.ts#L47-L54
Thanks @Meriem-BM , we should test it, because I know we need these stuff for some test cases and removing them would cause failing some test cases and also it's not related to the admin js test cases time, we can following up this in another issue
Okay, so it would be better to exclude permission test cases from these beforeEach at least as they don't require any DB interactions, I'll look up a way for that.
Thanks @Meriem-BM , Please let me know when you started and had a draft PR
@Meriem-BM pls work on this with guidance from @mohammadranjbarz
@mohammadranjbarz, what I did here is modify the global beforeEach
to exclude the permissions test case. This is done by preventing the code inside beforeEach
from executing when the test case title matches the permissions test cases.
@mohammadranjbarz, what I did here is modify the global
beforeEach
to exclude the permissions test case. This is done by preventing the code insidebeforeEach
from executing when the test case title matches the permissions test cases.
What a creative solution, well done
If it doesn't need to test from QA side please move it to the column related to its status @mohammadranjbarz
@maryjaf I approve that it's working, and as it's on the production I move this to Done JFYI @jainkrati