Skip to content

jjmrocha/jacoco-summary

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jacoco-summary

GitHub Action to add coverage from a JaCoCo report to the workflow job summary.

Usage

Add the following step to your GitHub Actions workflow after your tests and JaCoCo report generation:

- name: Add JaCoCo Coverage Summary
  uses: jjmrocha/jacoco-summary@v1
  with:
    jacoco-csv-file: path/to/jacoco.csv
  • jacoco-csv-file: Path to your JaCoCo CSV report file (defaults to build/reports/jacoco/test/jacocoTestReport.csv).

Example Workflow

name: CI

on:
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up JDK
        uses: actions/setup-java@v4
        with:
          java-version: '17'
          distribution: 'temurin'

      - name: Build and test with JaCoCo
        run: ./gradlew test jacocoTestReport

      - name: Add JaCoCo Coverage Summary
        uses: jjmrocha/jacoco-summary@v1

Output

The action parses the JaCoCo CSV report and adds a Markdown summary to the GitHub Actions job summary, showing overall and per-class coverage.

License

MIT

About

GitHub Action to summarize JaCoCo code coverage on builds

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published