Skip to content

[ANCHOR-413] Add jacoco test report to PR workflow #1053

[ANCHOR-413] Add jacoco test report to PR workflow

[ANCHOR-413] Add jacoco test report to PR workflow #1053

Workflow file for this run

# This workflow will build a Java project with Gradle.
# This workflow is triggered:
# On all pull request events
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
name: Pull Request Workflow
on:
pull_request:
jobs:
gradle_test_and_build:
uses: ./.github/workflows/sub_gradle_test_and_build.yml
build:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v3
- name: Add coverage to PR
id: jacoco
uses: madrapps/[email protected]
with:
paths: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 40
min-coverage-changed-files: 60
title: Code Coverage
update-comment: true
complete:
if: always()
needs: [gradle_test_and_build]
runs-on: ubuntu-22.04
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1