Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 23 additions & 25 deletions .github/workflows/testcase-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,43 @@ name: TestCase Coverage Check

on:
pull_request:
branches:
- master
- develop

permissions:
contents: read
pull-requests: write
issues: write

types: [opened, synchronize]

permissions: {}

jobs:
Build:
build_and_check_coverage:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Build with Maven
run: |
mvn clean verify -Dmaven.test.failure.ignore=false

- name: Upload JaCoCo Report Artifact
uses: actions/upload-artifact@v4
- name: Cache Maven dependencies
uses: actions/cache@v3
with:
name: jacoco-report
path: target/site/jacoco/jacoco.xml
if-no-files-found: warn
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-

- name: Build with Maven
run: mvn clean verify

- name: Compare JaCoCo Coverage
- name: Run Coverage Check
uses: madrapps/jacoco-report@v1.7.2
with:
paths: ${{ github.workspace }}/target/site/jacoco/jacoco.xml
paths: target/site/jacoco/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 0
min-coverage-overall: 40
min-coverage-changed-files: 60
title: Code Coverage Report
comment-type: pr_comment
Loading