Skip to content

ci: show Javadoc errors as test failures#24378

Open
Artur- wants to merge 6 commits into
mainfrom
fail-build-javadoc
Open

ci: show Javadoc errors as test failures#24378
Artur- wants to merge 6 commits into
mainfrom
fail-build-javadoc

Conversation

@Artur-
Copy link
Copy Markdown
Member

@Artur- Artur- commented May 20, 2026

Add a CI step that converts Javadoc errors found in the Maven log of the failing unit-tests shard into a synthetic JUnit XML report, so the existing publish-unit-test-result-action surfaces them in the same PR comment and job summary as regular test failures

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

Test Results

 1 420 files  ±0   1 420 suites  ±0   1h 20m 56s ⏱️ - 2m 48s
 9 999 tests ±0   9 931 ✅ ±0  68 💤 ±0  0 ❌ ±0 
10 471 runs  ±0  10 402 ✅ ±0  69 💤 ±0  0 ❌ ±0 

Results for commit 0d6a2ea. ± Comparison against base commit 7c1186a.

♻️ This comment has been updated with latest results.

Comment thread pom.xml Outdated
@caalador
Copy link
Copy Markdown
Contributor

At least this run doesn't actually print out any lines:
image

@caalador
Copy link
Copy Markdown
Contributor

It shows up only on the summary page it seems:
image

Works quite well 👍

Comment thread flow-server/src/main/java/com/vaadin/experimental/FeatureFlags.java Outdated
Artur- added 4 commits May 24, 2026 11:59
Make failOnError explicit on maven-javadoc-plugin so Javadoc errors
visibly break the build instead of being buried in log output.
Maven prefixes every Javadoc tool stderr line with [ERROR], so the
single real "error:" line gets lost among 100+ identically-prefixed
warning lines. Grep the actual error lines out of the per-shard Maven
log and write them to GITHUB_STEP_SUMMARY so they show up at the top
of the failing unit-tests job.

Also drops the redundant <failOnError>true</failOnError> override —
that's already the maven-javadoc-plugin default.
DO NOT MERGE. Temporary broken {@link} to a non-existent class so the
unit-tests job fails with a real Javadoc error, letting us confirm the
"Surface Javadoc errors" step actually surfaces it in the PR summary.
Revert before merge.
Generate a synthetic JUnit XML in the unit-tests job whenever the
shard log contains Javadoc errors, written to a path that the existing
"Package test-report files" step already tars up. The Test Results
job's publish-unit-test-result-action then picks it up alongside the
real surefire/failsafe reports, so the Javadoc failures appear in the
same PR comment and job summary as the rest of the test failures
rather than only in the per-shard step summary.
@Artur- Artur- force-pushed the fail-build-javadoc branch from f34f9c3 to 52212b0 Compare May 24, 2026 08:59
Moves the inline Python heredoc out of validation.yml and into
scripts/javadocErrorsToJUnit.py so the workflow stays readable and the
extractor can be edited and tested as a normal file.
@Artur- Artur- changed the title build: fail build explicitly on Javadoc errors ci: show Javadoc errors as test failures May 24, 2026
….java

Co-authored-by: caalador <mikael.grankvist@vaadin.com>
@Artur-
Copy link
Copy Markdown
Member Author

Artur- commented May 24, 2026

Now shows up among the test results:
image

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants