A Github action that creates an aggregated Jacoco report as a Pull Request comment. Also, it helps you to validate coverage percentage.
name: Coverage Check
on:
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate jacoco report
run: mvn clean test verify
- name: Check code coverage
uses: prajithp13/jacoco-coverage-action@master
with:
paths: reports/target/site/jacoco-aggregate/jacoco.csv
min-coverage: 90
token: ${{ secrets.GITHUB_TOKEN }}
Name | Required | Description | Default |
---|---|---|---|
paths | true | comma separated paths of the generated jacoco csv files. | null |
min-coverage | false | The minimum coverage required to pass the PR | 90 |
token | true | Github personal acess token to add comments to Pull Request | null |