Hi @cicirello,
thanks for this great action, I think it is very useful.
I have one question/suggestion related to maven multi module projects.
Is your feature request related to a problem? Please describe.
In your example, all modules are listed. This works for a small number of modules, but introduces the risk that when a new module is added to the project, it is not added here.
Describe the solution you'd like
I think it would be nice if a glob pattern could be provided here instead of the full list like **/jacoco.csv
.
Describe alternatives you've considered
It is possible to use this workaround, which is a bit verbose:
- name: Find JaCoCo reports of modules
run: |
find . -name jacoco.csv
echo "jacoco_csv_files=`find . -name jacoco.csv | tr '\n' ' '`" >> "$GITHUB_OUTPUT"
id: find_jacoco
- name: Generate JaCoCo Badge
id: jacoco
uses: cicirello/jacoco-badge-generator@v2
with:
generate-branches-badge: true
jacoco-csv-file: >
${{ steps.find_jacoco.outputs.jacoco_csv_files }}
Additional context
Just an additional thought:
Maybe it would even be nice to have a glob pattern as the default as opposed to 'target/site/jacoco/jacoco.csv'
, which should work for single and multi module projects. I don't see much downsides, except maybe that searching using the glob pattern will be a little slower as the hard coded default path.
Best,
Florian