Skip to content

Update dependency gradle to v8.5 #49

Update dependency gradle to v8.5

Update dependency gradle to v8.5 #49

Workflow file for this run

name: Compute Coverage
on:
workflow_dispatch:
push:
branches:
- dev
jobs:
generate_badge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 18
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 18
- name: Run Test Coverage
run: ./gradlew jacocoTestReport
- name: Generate JaCoCo Badge
uses: cicirello/jacoco-badge-generator@v2
with:
generate-branches-badge: true
jacoco-csv-file: >
1.16-testing/build/reports/jacoco/test/jacocoTestReport.csv
core/build/reports/jacoco/test/jacocoTestReport.csv
paper/build/reports/jacoco/test/jacocoTestReport.csv
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Commit the badge (if it changed)
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name 'Yannick Lamprecht'
git config --global user.email '1420893+yannicklamprecht@users.noreply.github.com'
git add -A
git commit -m "[skip ci] Autogenerated JaCoCo coverage badge"
fi
- name: Pushing
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.ACCESS_TOKEN }}
branch: dev
- name: Upload JaCoCo coverage report
uses: actions/upload-artifact@v3
with:
name: jacoco-report
path: |
1.16-testing/build/reports/jacoco/test/jacocoTestReport.csv
core/build/reports/jacoco/test/jacocoTestReport.csv
paper/build/reports/jacoco/test/jacocoTestReport.csv