Hello,
currently we have a GH actions workflow that executes for every PR a big bunch of JUnit5 tests using Gradle and then runs Sonar Analysis using Gradle´s plugin.
This works, but the problem is that there are different types of tests (some of them are slow, others use native libs, etc) so we would like to split those tests and run them using different suites in parallel (3 suites in total).
So, I’d like to explore what are the different options here:
Run tests in parallel and, when all of them finish, run a job that collects all jacoco exec files from the previous executions and then run the Sonar Analysis
Every test execution runs Sonar too (3 Sonar analysis)
Any other option?
I think ideally #1 would be better so that we only run Sonar once but I don’t know if this would feasible.
For option #2, It would be easier setup, but I’m worried about last analysis overriding coverage results from previous analysis
Could you let me know if both approaches are feasible? Any other idea?
Hi Colin,
thanks for your response.
We don’t have multiple modules nor suites configured.
I finally made it by uploading all .exec files generated by jacoco plugin during tests to a job that downloads all of them and executes jacocoTestReport task (to generate xml files needed by sonar) and finally call sonar analysis task