#14 allow to leave the game at any time #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Gradle project | |
on: | |
push: | |
jobs: | |
build-gradle-project: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project sources | |
uses: actions/checkout@v2 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build | |
run: ./gradlew build -x test | |
- name: Test | |
run: ./gradlew test jacocoTestReport | |
- name: Test Results | |
uses: dorny/test-reporter@v1 | |
if: always() | |
with: | |
name: Gradle Tests | |
path: backend/build/test-results/test/*.xml | |
reporter: java-junit | |
fail-on-error: true | |
- name: JaCoCo Code Coverage Report | |
id: jacoco_reporter | |
uses: PavanMudigonda/jacoco-reporter@v4.8 | |
with: | |
coverage_results_path: backend/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: false | |
publish_only_summary: false | |
# Publish Coverage Job Summary # Optional | |
- name: Add Coverage Job Summary | |
run: echo "${{ steps.jacoco_reporter.outputs.coverageSummary }}" >> $GITHUB_STEP_SUMMARY | |
# uploads the coverage-report.md artifact # Optional | |
- name: Upload Code Coverage Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: code-coverage-report-markdown | |
path: '*/coverage-results.md' | |
retention-days: 1 |