lewismc commented on PR #863: URL: https://github.com/apache/nutch/pull/863#issuecomment-3388228701
After some thinking I revisited this today. I learned quite a few things 1. In order for the [mikepenz/action-junit-report action](https://github.com/mikepenz/action-junit-report) 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](https://ci-builds.apache.org/job/Nutch/job/Nutch-trunk/lastCompletedBuild/testReport/TEST-org.apache.nutch.util.TestMimeUtil/xml/_empty_/). 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 https://github.com/apache/nutch/pull/865 and then reopening it... which will trigger a CI run and hopefully trigger the `workflow_run` workflow if the `master-build` was successful. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]

