Skip to content

testing github action #91

testing github action

testing github action #91

Workflow file for this run

name: Java CI with Maven
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4.2.1
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Build and Test with Maven
timeout-minutes: 15
env:
MAVEN_OPTS: "-XX:MinHeapFreeRatio=35"
run: ./mvnw -B verify
- name: Get JaCoCo Coverage
id: coverage
run: |
coverage=$(python3 config/coverage.py target/site/jacoco/jacoco.csv)
echo "COVERAGE=$coverage" >> $GITHUB_ENV
- name: Fail if coverage has not improved.
run: |
coverage=$COVERAGE
threshold=24.46
if (( $(echo "$coverage - $threshold <= 0.1" | bc -l) )); then
echo "Coverage is not improved."
exit 1
else
echo "New coverage: $coverage%. Coverage is improved!"
fi