Skip to content

Commit a98e8f0

Browse files
authored
Merge pull request #176 from edburns/edburns/adjust-reporting-for-two-executions
Ensure reporting is aware of the two test executions.
2 parents eabfcb6 + 5df33ee commit a98e8f0

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

.github/actions/test-report/action.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ inputs:
44
report-path:
55
description: "Path to the test report XML files (glob pattern)"
66
required: false
7-
default: "target/surefire-reports/TEST-*.xml"
7+
default: "target/surefire-reports*/TEST-*.xml"
88
jacoco-path:
99
description: "Path to the JaCoCo XML report"
1010
required: false
@@ -22,10 +22,7 @@ runs:
2222
echo "## 🧪 Copilot Java SDK :: Test Results" >> $GITHUB_STEP_SUMMARY
2323
echo "" >> $GITHUB_STEP_SUMMARY
2424
25-
REPORT_DIR=$(dirname "${{ inputs.report-path }}")
26-
REPORT_PATTERN=$(basename "${{ inputs.report-path }}")
27-
28-
if [ -d "$REPORT_DIR" ]; then
25+
if ls ${{ inputs.report-path }} 1>/dev/null 2>&1; then
2926
TESTS_RUN=$(grep -h "tests=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*tests="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}')
3027
FAILURES=$(grep -h "failures=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*failures="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}')
3128
ERRORS=$(grep -h "errors=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*errors="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}')

.github/workflows/build-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ jobs:
130130
path: |
131131
target/jacoco-test-results/sdk-tests.exec
132132
target/surefire-reports/
133+
target/surefire-reports-isolated/
133134
retention-days: 1
134135

135136
- name: Generate JaCoCo badge

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,11 @@
359359
</goals>
360360
<configuration>
361361
<groups>isolated-resume</groups>
362+
<!-- Use a separate report directory so these results
363+
don't overwrite the default-test XML reports for
364+
the same test classes (CopilotSessionTest,
365+
StreamingFidelityTest). -->
366+
<reportsDirectory>${project.build.directory}/surefire-reports-isolated</reportsDirectory>
362367
</configuration>
363368
</execution>
364369
<!-- Exclude the isolated resume tests from the main run -->

0 commit comments

Comments
 (0)