From a56a2279557cdb30082dcbe67c517f4149112d10 Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Fri, 8 May 2026 19:04:14 -0400 Subject: [PATCH 1/3] Ensure reporting is aware of the two test executions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. **action.yml** โ€” Widens the default `report-path` glob from `target/surefire-reports/TEST-*.xml` to `target/surefire-reports*/TEST-*.xml` so both report directories are picked up. Replaces the `-d "$REPORT_DIR"` directory check with `compgen -G` since the path now contains a wildcard in the directory component. 2. **build-test.yml** โ€” Adds `target/surefire-reports-isolated/` to the artifact upload path so the isolated execution's reports are preserved in CI. 3. **pom.xml** โ€” Adds `${project.build.directory}/surefire-reports-isolated` (with a comment) to the `isolated-resume-tests` Surefire execution so its XML reports don't overwrite the default-test reports for the same classes. Signed-off-by: Ed Burns --- .github/actions/test-report/action.yml | 5 +++-- .github/workflows/build-test.yml | 1 + pom.xml | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/actions/test-report/action.yml b/.github/actions/test-report/action.yml index 43d45f287a..6760be48ad 100644 --- a/.github/actions/test-report/action.yml +++ b/.github/actions/test-report/action.yml @@ -4,7 +4,7 @@ inputs: report-path: description: "Path to the test report XML files (glob pattern)" required: false - default: "target/surefire-reports/TEST-*.xml" + default: "target/surefire-reports*/TEST-*.xml" jacoco-path: description: "Path to the JaCoCo XML report" required: false @@ -25,7 +25,8 @@ runs: REPORT_DIR=$(dirname "${{ inputs.report-path }}") REPORT_PATTERN=$(basename "${{ inputs.report-path }}") - if [ -d "$REPORT_DIR" ]; then + # Use compgen to check if the glob expands to any files + if compgen -G "${{ inputs.report-path }}" > /dev/null 2>&1; then TESTS_RUN=$(grep -h "tests=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*tests="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}') FAILURES=$(grep -h "failures=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*failures="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}') ERRORS=$(grep -h "errors=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*errors="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}') diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 9154375a9a..29fd1fd119 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -130,6 +130,7 @@ jobs: path: | target/jacoco-test-results/sdk-tests.exec target/surefire-reports/ + target/surefire-reports-isolated/ retention-days: 1 - name: Generate JaCoCo badge diff --git a/pom.xml b/pom.xml index f1170e63f7..c7ad2f6dea 100644 --- a/pom.xml +++ b/pom.xml @@ -359,6 +359,11 @@ isolated-resume + + ${project.build.directory}/surefire-reports-isolated From 0fbd0dfc446e72e6b9d7fe030ca150ed993142fb Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Fri, 8 May 2026 19:11:19 -0400 Subject: [PATCH 2/3] avoid builtin --- .github/actions/test-report/action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/test-report/action.yml b/.github/actions/test-report/action.yml index 6760be48ad..889121f8ee 100644 --- a/.github/actions/test-report/action.yml +++ b/.github/actions/test-report/action.yml @@ -25,8 +25,7 @@ runs: REPORT_DIR=$(dirname "${{ inputs.report-path }}") REPORT_PATTERN=$(basename "${{ inputs.report-path }}") - # Use compgen to check if the glob expands to any files - if compgen -G "${{ inputs.report-path }}" > /dev/null 2>&1; then + if ls ${{ inputs.report-path }} 1>/dev/null 2>&1; then TESTS_RUN=$(grep -h "tests=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*tests="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}') FAILURES=$(grep -h "failures=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*failures="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}') ERRORS=$(grep -h "errors=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*errors="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}') From 5df33ee5254b2e4f079e269931b0525c1bb0c519 Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Fri, 8 May 2026 19:18:49 -0400 Subject: [PATCH 3/3] Remove dead code Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/actions/test-report/action.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/actions/test-report/action.yml b/.github/actions/test-report/action.yml index 889121f8ee..4f807ed911 100644 --- a/.github/actions/test-report/action.yml +++ b/.github/actions/test-report/action.yml @@ -22,9 +22,6 @@ runs: echo "## ๐Ÿงช Copilot Java SDK :: Test Results" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - REPORT_DIR=$(dirname "${{ inputs.report-path }}") - REPORT_PATTERN=$(basename "${{ inputs.report-path }}") - if ls ${{ inputs.report-path }} 1>/dev/null 2>&1; then TESTS_RUN=$(grep -h "tests=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*tests="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}') FAILURES=$(grep -h "failures=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*failures="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}')