Skip to content

Push JaCoCo badges on main branch build #38

Push JaCoCo badges on main branch build

Push JaCoCo badges on main branch build #38

Workflow file for this run

name: Java CI with Maven
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- run: mvn -B verify
- uses: madrapps/jacoco-report@v1.6.1
with:
paths: ${{ github.workspace }}/target/site/jacoco/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
- uses: cicirello/jacoco-badge-generator@v2.11.0
- if: github.ref == 'refs/heads/main'
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name "Matomo Java Tracker"
git config --global user.email "matomo-java-tracker@daniel-heid.de"
git add -A
git commit -m "Autogenerated JaCoCo coverage badge"
git push
fi