Skip to content

simplified some code #59

simplified some code

simplified some code #59

Workflow file for this run

name: Tests and Coverage
on:
push:
branches: [ main ]
pull_request:
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run gradle tests
run: ./gradlew clean build jacocoTestReport
# generates coverage-report.md and publishes as checkrun
- name: JaCoCo Code Coverage Report
id: jacoco_reporter
uses: PavanMudigonda/jacoco-reporter@v4.8
with:
coverage_results_path: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
coverage_report_name: Coverage
coverage_report_title: JaCoCo
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_check_run: false
minimum_coverage: 80
fail_below_threshold: true
publish_only_summary: false
# Publish Coverage Job Summary # Optional
- name: Add Coverage Job Summary
run: echo "${{ steps.jacoco_reporter.outputs.coverageSummary }}" >> $GITHUB_STEP_SUMMARY