Closed kavithatiru closed 1 year ago
@kavithatiru What is the rest of your workflow? How are you running JaCoCo? All that error message tells me is that the file target/site/jacoco/jacoco.csv
doesn't exist. The jacoco-badge-generator action doesn't create that file. Your build does. And it the jacoco-badge-generator needs it (it has all of the coverage information).
What steps do you have in your workflow before this? What is the build configuration for your project?
This doesn't sound like a bug with jacoco-badge-generator. But I'm happy to help you figure this out if you are able to provide more information about the rest of your workflow.
After upgrading to Jacoco 0.8.10 the issue is resolved. Thank you for the quick response.
Describe the bug After upgrading to Jdk17 from 11 the jacoco badge github action failing with the below error.
name: Generate JaCoCo Badge id: jacoco uses: cicirello/jacoco-badge-generator@v2 with: badges-directory: badges generate-branches-badge: true generate-summary: true
generate-branches-badge: true generate-summary: true jacoco-csv-file: target/site/jacoco/jacoco.csv coverage-badge-filename: jacoco.svg branches-badge-filename: branches.svg generate-coverage-badge: true coverage-label: coverage branches-label: branches on-missing-report: fail fail-if-coverage-less-than: 0 fail-if-branches-less-than: 0 fail-on-coverage-decrease: false fail-on-branches-decrease: false intervals: 100 90 80 70 60 0 colors: #4c1 #97ca00 #a4a61d #dfb317 #fe7d37 #e05d44 generate-coverage-endpoint: false generate-branches-endpoint: false coverage-endpoint-filename: jacoco.json branches-endpoint-filename: branches.json summary-filename: coverage-summary.json env: DOCKER_REGISTRY: https://packages.aa.com DOCKER_REPOSITORY_DEV: packages.aa.com/docker-dev/dotcwebappimage REPO_NAME: pcs-dotcras-webapp JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.7-7/x64 JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.7-7/x64 /usr/bin/docker run --name c9a4a5cf7c06edd4384493bf0d4f88f418a56b_6564cb --label c9a4a5 --workdir /github/workspace --rm -e "DOCKER_REGISTRY" -e "DOCKER_REPOSITORY_DEV" -e "REPO_NAME" -e "JAVA_HOME" -e "JAVA_HOME_17_X64" -e "INPUT_BADGES-DIRECTORY" -e "INPUT_GENERATE-BRANCHES-BADGE" -e "INPUT_GENERATE-SUMMARY" -e "INPUT_JACOCO-CSV-FILE" -e "INPUT_COVERAGE-BADGE-FILENAME" -e "INPUT_BRANCHES-BADGE-FILENAME" -e "INPUT_GENERATE-COVERAGE-BADGE" -e "INPUT_COVERAGE-LABEL" -e "INPUT_BRANCHES-LABEL" -e "INPUT_ON-MISSING-REPORT" -e "INPUT_FAIL-IF-COVERAGE-LESS-THAN" -e "INPUT_FAIL-IF-BRANCHES-LESS-THAN" -e "INPUT_FAIL-ON-COVERAGE-DECREASE" -e "INPUT_FAIL-ON-BRANCHES-DECREASE" -e "INPUT_INTERVALS" -e "INPUT_COLORS" -e "INPUT_GENERATE-COVERAGE-ENDPOINT" -e "INPUT_GENERATE-BRANCHES-ENDPOINT" -e "INPUT_COVERAGE-ENDPOINT-FILENAME" -e "INPUT_BRANCHES-ENDPOINT-FILENAME" -e "INPUT_SUMMARY-FILENAME" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/pcs-dotcras-webapp/pcs-dotcras-webapp":"/github/workspace" c9a4a5:cf7c06edd4384493bf0d4f88f418a56b "target/site/jacoco/jacoco.csv" "badges" "jacoco.svg" "branches.svg" "true" "true" "fail" "0" "0" "false" "false" "100 90 80 70 60 0" "#4c1 #97ca00 #a4a61d #dfb317 #fe7d37 #e05d44" "false" "false" "jacoco.json" "branches.json" "true" "coverage-summary.json" "coverage" "branches" WARNING: Report file target/site/jacoco/jacoco.csv does not exist or glob target/site/jacoco/jacoco.csv is empty. WARNING: No JaCoCo csv reports found.