Differents tests in sonarcloud in the same project

Hi, I have a project that runs 2 diferentes tests, unit and integrations test, we use github actions workflow matrix strategy but since is in the same project is uses the same project key, the coverage is not correct since sonarcloud more thank likely is overwritting or summarizing the two coverlet tests into one and we want to avoid that, is it possible to have 2 differents coverage in one project? could we segment that?

Hey @Jocasmen94

All coverage reports need to be available before running the scanner (which you only want to do once, otherwise results will be overwritten). You may want to consider passing artifacts between your build stages so that they are ultimately all available before running the scanner.

Hi Colin, that is exactly what was happening, right now we are using the artifacts strategy in one reusable will do the tests and creates the 4 artifacts and in the other one will download the artifacts and they push them to sonarcloud into the project, will that work? thank you! by any change do you have an example of that script in your documentation for github actions?

That sounds like it should work. If you get it working, feel free to share it here to help the Community! Unfortunately I don’t have a working example on hand.