Skip to content

NUTCH-3126 Report JUnit test results in GitHub pull request thread - #863

Merged
lewismc merged 14 commits into
apache:masterfrom
lewismc:NUTCH-3126
Oct 10, 2025
Merged

lewismc merged 14 commits into
apache:masterfrom
lewismc:NUTCH-3126

Conversation

@lewismc

@lewismc lewismc commented Sep 12, 2025

Copy link
Copy Markdown
Member

@lewismc lewismc self-assigned this Sep 12, 2025
@lewismc
lewismc marked this pull request as draft September 18, 2025 03:44
@lewismc

lewismc commented Sep 29, 2025

Copy link
Copy Markdown
Member Author

Pursuing https://issues.apache.org/jira/browse/INFRA-27286 in order to understand whether we can enable comments on PR's.

@lewismc
lewismc marked this pull request as ready for review October 10, 2025 04:03
@lewismc

lewismc commented Oct 10, 2025

Copy link
Copy Markdown
Member Author

After some thinking I revisited this today. I learned quite a few things

  1. In order for the mikepenz/action-junit-report action to create check runs and post comments, we need to grant checks: write and pull-requests: write permissions. This causes an issue/it doesn't work as part of the master-build.yml workflow because for pull requests from forked repositories GitHub restricts the default token to read-only access for security purposes. So in order to keep moving forward I created a complementary (downstream) workflow_run workflow named junit-report.yml which run with the correct permissions.
  2. Because we run build and tests on a matrix of OS's (currently linux & macos both with Java 11) I had to introduce an action which would first upload JUnit test XML reports (implemented in master-build.yml) and another action which would later download the results (implemented in junit-report.yml) to report on them. The issue I came across is that because we have the matrix setup, we potentially upload the JUnit test report artifact more than once. In order to overcome that I currently overwrite the artifact so only one exists which is then used in the workflow_run workflow.
  3. The workflow_run event will only trigger a workflow run if the workflow file is on the default branch (master)... which it cannot be until it is merged into master.
  4. I discovered that TestMimeUtil.java is not writing any output to the XML file. So I will investigate that separately. For now I've disabled the check for erroneous test report XML files but once I fix this issue I will reactivate this check.

So with that being said

  1. All testing behavior is unaffected.
  2. I will merge this PR into master branch so that I can validate the workflow_run workflow can be triggered. I will validate this by closing NUTCH-3099 Allow wildcard '*' in http.proxy.exception.list (via Isabelle Giguere) #865 and then reopening it... which will trigger a CI run and hopefully trigger the workflow_run workflow if the master-build was successful.

@lewismc
lewismc merged commit 2d92366 into apache:master Oct 10, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant