Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No changed files detected in a Maven multi-module project. #197

Open
bauna opened this issue Nov 21, 2024 · 0 comments
Open

No changed files detected in a Maven multi-module project. #197

bauna opened this issue Nov 21, 2024 · 0 comments

Comments

@bauna
Copy link

bauna commented Nov 21, 2024

Hi All,
Kudos for the hard work put into the project, it's really appreciated!
I wanted to be sure if I could use this project with a maven multi-module repo, because all examples I find are using Gradle.
AFAIK I understand the JaCoCo reports XML files should be the same no matter what tool is used to generate them.
Bellow you can see the output of a run and the action YAML I'm using.
JaCoCo maven plugin is generating the reports in the location: /target/site/jacoco/jacoco.xml
Please do not hesitate for further information or debug info.
Thanks!

Resolved files: 
project: {
    "modules": [],
    "isMultiModule": false,
    "overall": null,
    "changed": null,
    "coverage-changed-files": 100
}
skip: false
prNumber: 1
update: false
title: 
JaCoCo Comment: > There is no coverage information present for the Files changed
name: JaCoCo reports

on:
  pull_request:

permissions:
  contents: read
  pull-requests: write
  id-token: write

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - name: Corretto Set Java 21
      uses: actions/setup-java@v4
      with:
        distribution: 'corretto'
        java-version: '21'
        cache: 'maven'
        cache-dependency-path: marty-webapp/pom.xml
    - name: Run Coverage
      run: |
        cd $GITHUB_WORKSPACE
        ./mvnw -B clean test 

    - name: Jacoco Report to PR
      id: jacoco
      uses: madrapps/[email protected]
      with:
        paths: |
          ${{ github.workspace }}/**/target/**/jacoco/*.xml
        token: ${{ secrets.GH_TOKEN }}
        min-coverage-overall: 20
        min-coverage-changed-files: 30
        debug-mode: true

    - name: Get the Coverage info
      run: |
        echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}"
        echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant