Skip to content

Feedback

Feedback #49

Workflow file for this run

name: Measure coverage
on:
workflow_dispatch:
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: zulu
- name: Create Coverage Report
run: |
chmod +x gradlew
./gradlew jacocoTestReport
- if: matrix.os == 'ubuntu-latest'
name: Generate Jacoco Badge
uses: cicirello/[email protected]
with:
jacoco-csv-file: lib/build/jacoco/report.csv
badges-directory: .github/badges
generate-coverage-badge: true
coverage-badge-filename: jacoco.svg
- name: Commit the badges (if they changed)
run: |
if [[ `git diff --exit-code .github/badges` ]]; then
git config --global user.name 'qrutyy'
git config --global user.email '[email protected]'
git add .github/badges/*
git commit -m "ci: autogenerate JaCoCo coverage badge"
git push || true
fi
shell: bash