Skip to content

Commit f986a11

Browse files
committed
attempting to fix reporting generation
1 parent e35bc58 commit f986a11

File tree

3 files changed

+48
-6
lines changed

3 files changed

+48
-6
lines changed

.github/workflows/ci-reports.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,29 @@ jobs:
2525
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2626
restore-keys: ${{ runner.os }}-m2
2727

28-
- name: Run tests
29-
run: mvn -B clean test
28+
- name: Run tests with coverage
29+
run: ./mvnw -B clean test
3030

31-
- name: Generate reports
32-
run: mvn -B jacoco:report pmd:pmd pmd:check
31+
- name: Generate JaCoCo report
32+
run: ./mvnw -B jacoco:report -Dmaven.test.skip=true
33+
34+
- name: Generate PMD report (without failing on violations)
35+
run: ./mvnw -B pmd:pmd -Dpmd.failOnViolation=false -Dmaven.test.skip=true
36+
37+
- name: Generate HTML site reports
38+
run: ./mvnw -B site -Dcheckstyle.failsOnError=false -Dpmd.failOnViolation=false -Dmaven.test.skip=true
39+
40+
- name: Run quality checks (separate from report generation)
41+
run: ./mvnw -B checkstyle:check pmd:check -Dmaven.test.skip=true
42+
continue-on-error: true
43+
44+
- name: Debug - List generated files
45+
run: |
46+
echo "Checking for generated reports..."
47+
ls -la target/site/ || echo "No target/site directory"
48+
ls -la target/site/jacoco/ || echo "No JaCoCo reports"
49+
echo "PMD report location:"
50+
find target -name "pmd.html" -o -name "index.html" | grep -E "(pmd|site)" || echo "No PMD HTML reports found"
3351
3452
- name: Install wkhtmltopdf
3553
run: |

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,16 @@
253253
</executions>
254254
</plugin>
255255

256+
<!-- Maven Site Plugin -->
257+
<plugin>
258+
<groupId>org.apache.maven.plugins</groupId>
259+
<artifactId>maven-site-plugin</artifactId>
260+
<version>4.0.0-M13</version>
261+
<configuration>
262+
<locales>en</locales>
263+
</configuration>
264+
</plugin>
265+
256266
<!-- JaCoCo -->
257267
<plugin>
258268
<groupId>org.jacoco</groupId>

scripts/html_to_png.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,31 @@ mkdir -p reports
1111
JACOCO_HTML="target/site/jacoco/index.html"
1212
if [ ! -f "$JACOCO_HTML" ]; then
1313
echo "ERROR: JaCoCo HTML report not found at $JACOCO_HTML"
14+
echo "Available files in target/site/:"
15+
ls -la target/site/ || echo "No target/site directory"
16+
echo "Available files in target/site/jacoco/:"
17+
ls -la target/site/jacoco/ || echo "No target/site/jacoco directory"
1418
exit 1
1519
fi
1620

17-
# Check for PMD HTML report (try both possible locations)
21+
# Check for PMD HTML report (try multiple possible locations)
1822
PMD_HTML=""
1923
if [ -f "target/site/pmd.html" ]; then
2024
PMD_HTML="target/site/pmd.html"
2125
elif [ -f "target/site/pmd/index.html" ]; then
2226
PMD_HTML="target/site/pmd/index.html"
27+
elif [ -f "target/site/pmd/pmd.html" ]; then
28+
PMD_HTML="target/site/pmd/pmd.html"
2329
else
24-
echo "ERROR: PMD HTML report not found at target/site/pmd.html or target/site/pmd/index.html"
30+
echo "ERROR: PMD HTML report not found"
31+
echo "Searched locations:"
32+
echo " - target/site/pmd.html"
33+
echo " - target/site/pmd/index.html"
34+
echo " - target/site/pmd/pmd.html"
35+
echo "Available files in target/site/:"
36+
ls -la target/site/ || echo "No target/site directory"
37+
echo "Searching for any PMD-related files:"
38+
find target -name "*pmd*" -type f || echo "No PMD files found"
2539
exit 1
2640
fi
2741

0 commit comments

Comments
 (0)