From 6b1a4de65a12a155e98e957ea82e446ef6420b36 Mon Sep 17 00:00:00 2001
From: loong10k <20489781+loong10k@users.noreply.github.com>
Date: Wed, 4 Nov 2026 09:29:46 +0800
Subject: [PATCH] fix: preserve JaCoCo agent in test JVM arguments
---
.github/workflows/ci.yml | 9 +++++++--
pom.xml | 4 +++-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 61fc12c..7913f0d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -37,12 +37,17 @@ jobs:
- name: Build and verify with JaCoCo coverage gate
run: mvn -B --no-transfer-progress clean verify
+ - name: Require coverage for existing JWT tests
+ run: |
+ test -s jwt-issuer-with-jjwt/target/jacoco.exec
+ test -s jwt-issuer-with-jjwt/target/site/jacoco/jacoco.xml
+
- name: Upload JaCoCo coverage report
if: always()
uses: actions/upload-artifact@v7
with:
name: jacoco-coverage
- path: target/site/jacoco
+ path: "**/target/site/jacoco/**"
retention-days: 14
- name: Upload surefire reports
@@ -50,5 +55,5 @@ jobs:
uses: actions/upload-artifact@v7
with:
name: surefire-reports
- path: target/surefire-reports
+ path: "**/target/surefire-reports/**"
retention-days: 14
diff --git a/pom.xml b/pom.xml
index cc650bd..e0323e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -204,7 +204,7 @@
false
false
once
- -Xmx1024m
+ @{jacocoArgLine} -Xmx1024m
-Dfile.encoding=UTF-8
${basedir}/target/test-classes
@@ -288,6 +288,7 @@
prepare-agent
+ jacocoArgLine
prepare-agent
@@ -502,6 +503,7 @@
+
17
17
17