Can I upload the same report for different flags?

The project I am working on is fairly large, it has 30+ modules, each with producing 3 jacoco reports, one for unit tests, one for integration tests, and one combining the 2 into a single merged report.

In addition to this, we have an aggergator project as the final module, which is simply a POM file that produces a jacoco-aggregate report for the previous modules in the project, again giving us 3 reports, one with just the unit test coverage, one with just the integration tests, and a merged one combining the two.

Now my main issue is that in the aggregator report, 2 of the modules have coverage that doesn’t show up in their own individual reports, because those newly covered lines are covered in a subsequent module.

So what should I do here? Upload the same, final aggregate report for each of the modules (configured as flags)?

The Guides were a bit vague on this.

I’ve currently configured my yaml like so

coverage:
  status:
    project:
      default:
        target: auto
      mod1:
        flags:
          - mod1
      mod2:
        flags:
          - mod2
flags:
  mod1:
    paths:
      - module1/
  mod2:
    paths:
      - module2/

And so should I upload like this?

bash <(curl -s https://codecov.io/bash) -f jacoco-aggregate/target/site/jacoco-aggregate/jacoco.xml -F mod1
bash <(curl -s https://codecov.io/bash) -f jacoco-aggregate/target/site/jacoco-aggregate/jacoco.xml -F mod2

Hi @JohnLBergqvist, that looks accurate to me. Just to be clear, you should upload like this

bash <(curl -s https://codecov.io/bash) -f jacoco-aggregate/target/site/jacoco-aggregate/jacoco.xml -F mod1
bash <(curl -s https://codecov.io/bash) -f jacoco-aggregate/target/site/jacoco-aggregate/jacoco.xml -F mod2

as written in your note