#984 Set up builds and tests to run per changed module #2
Workflow file for this run
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: Test coverage | |
on: | |
pull_request: | |
paths: | |
- 'hartshorn-*/**' | |
jobs: | |
coverage: | |
name: Code coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up source JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Run tests | |
run: ./gradlew jacocoMergedReport | |
- name: Add coverage to PR | |
id: jacoco | |
uses: madrapps/[email protected] | |
with: | |
title: Code coverage | |
update-comment: true | |
paths: | | |
${{ github.workspace }}/build/reports/jacoco/jacocoMergedReport/jacocoMergedReport.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
min-coverage-overall: 80 | |
min-coverage-changed-files: 80 | |
- name: Verify coverage report | |
run: ./gradlew jacocoTestCoverageVerification |