Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 0 additions & 11 deletions .github/workflows/java-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,6 @@ jobs:
mvn clean test package deploy \
-s .mvn/settings.xml \
-Dproject.version=${{ inputs.version }}
- name: Generate JaCoCo Summary
if: github.event_name != 'workflow_dispatch' # Prevents the "Event not supported" error
uses: madrapps/jacoco-report@v1.7.1
with:
paths: ${{ github.workspace }}/target/site/jacoco/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 60
title: 'Code Coverage Report'
update-comment: true


- name: Upload JAR artifact
uses: actions/upload-artifact@v4
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/java-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test and Coverage

on:
pull_request:
branches:
- main
- master

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

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
cache: 'maven'

- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.9

- name: Run Tests and Coverage
run: mvn clean test jacoco:report

- name: Add coverage to PR
id: jacoco
uses: madrapps/jacoco-report@v1.7.1
with:
paths: ${{ github.workspace }}/target/site/jacoco/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 60
title: 'Code Coverage Report'
update-comment: true