Drop using gson and add test coverage (#49) #58
This file contains hidden or 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: Java CI | |
| on: | |
| push: | |
| branches: [ "develop" ] | |
| pull_request: | |
| branches: [ "develop" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | |
| - name: Compile all modules | |
| run: ./gradlew testClasses | |
| - name: Run tests for all modules | |
| run: ./gradlew test | |
| - name: Generate test report | |
| uses: mikepenz/action-junit-report@v5 | |
| if: success() || failure() # always run even if the previous step fails | |
| with: | |
| report_paths: '**/build/test-results/test/TEST-*.xml' | |
| summary: true | |
| detailed_summary: true | |
| require_passed_tests: true | |
| include_passed: true | |
| - name: Generate jacoco reports | |
| run: ./gradlew jacocoTestReport | |
| - name: Generate aggregated jacoco report | |
| run: ./gradlew test-coverage:testCodeCoverageReport | |
| - name: Add coverage to PR | |
| id: jacoco | |
| uses: madrapps/[email protected] | |
| with: | |
| paths: ${{ github.workspace }}/test-coverage/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| min-coverage-overall: 40 | |
| min-coverage-changed-files: 60 | |
| dependency-submission: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| - name: Generate and submit dependency graph | |
| uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 |