Skip to content

Add javadoc, checkstyle, surefire report to the site #29

Add javadoc, checkstyle, surefire report to the site

Add javadoc, checkstyle, surefire report to the site #29

Workflow file for this run

name: Java CI with Maven
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Tests
id: get_coverage
run: |
COVERAGE=$(sed -nE 's/^.*<td>Total<([^>]+>){4}([^<]*).*$/\2/p' target/site/jacoco/index.html | sed -nE 's/[^0-9]*([0-9]+).*/\1/p')
if [ $COVERAGE -lt 70 ]; then
COLOR=red
elif [ $COVERAGE -lt 90 ]; then
COLOR=orange
else
COLOR=green
fi
echo "::set-output name=COVERAGE::$COVERAGE"
echo "::set-output name=COLOR::$COLOR"
- name: Create the Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 73adb891918b248bf5cd39afb416ee7c
filename: test.json
label: Coverage
message: ${{ steps.get_coverage.outputs.COVERAGE }}%
color: ${{ steps.get_coverage.outputs.COLOR }}