Skip to content

Test

Test #82

Workflow file for this run

name: build
on: [push]
jobs:
build_job: # job name
runs-on: ubuntu-22.04
steps:
- name: Use JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
# here the actual build starts
- name: Standard Checkout
uses: actions/[email protected]
- name: Build with Maven
run: mvn -B verify
- name: Upload JaCoCo coverage report
uses: actions/[email protected]
with:
name: jacoco-report
path: aggregate-report/target/site/jacoco-aggregate/
generate_badges:
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
needs: build_job
steps:
- name: Get JaCoCo coverage report
uses: actions/[email protected]
with:
name: jacoco-report
path: aggregate-report/target/site/jacoco-aggregate/
- name: Generate JaCoCo Badge
uses: cicirello/[email protected]
with:
jacoco-csv-file: aggregate-report/target/site/jacoco-aggregate/jacoco.csv
generate-branches-badge: true
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Shallow Checkout
uses: actions/[email protected]
with:
fetch-depth: 1
- name: Commit and push the badge (if it changed)
uses: EndBug/[email protected]
with:
default_author: github_actions
message: 'Autogenerated JaCoCo coverage badge'
add: '*.svg'