codeclimate-action icon indicating copy to clipboard operation
codeclimate-action copied to clipboard

JaCoCo with Maven multi-module or Gradle multi-project builds

Open derekm opened this issue 4 years ago • 2 comments

Describe the bug coverageLocations can be multiple values, but JACOCO_SOURCE_PATH can only contain one value.

In a Java build that produces multiple jars, I need a different JaCoCo source path per coverage location.

Version of codeclimate-action you're using v2.5.7

Expected behavior I should be able to specify the source paths for each coverage location.

Additional context This may need to be reported upstream here: https://github.com/codeclimate/test-reporter

derekm avatar Jul 27 '20 15:07 derekm

Hi guys! I'm having the same issue. Here you can see an example of the error, and this is the PR where I am adding the action.

fnobilia avatar Nov 19 '20 21:11 fnobilia

Looking at the codeclimate test-reporter's code reveals that a whitespace separated list is expected as input: https://github.com/codeclimate/test-reporter/commit/b2ae857af964b1f4161d004238c45e1bf666f4f6

Unfortunately, this action does not support globbing for the environment variables (I'm guessing that it's not possible to re-set an environment variable from within the running action?), so while I can use tree globbing "**" for the coverageLocations, I have to explicitly list every modules source directories...

Working example: https://github.com/afranken/advent-of-code-java/blob/main/.github/workflows/maven-ci.yml

afranken avatar Nov 01 '21 11:11 afranken