Skip to content

ci: fix test results not commenting on PRs#2462

Merged
jbonofre merged 1 commit intoapache:mainfrom
jbonofre:fix/ci-test-results-pr-comment
Mar 19, 2026
Merged

ci: fix test results not commenting on PRs#2462
jbonofre merged 1 commit intoapache:mainfrom
jbonofre:fix/ci-test-results-pr-comment

Conversation

@jbonofre
Copy link
Member

Summary

  • Upload the GitHub event payload file as an artifact in the CI workflow
  • Download it in the test-results workflow and pass it to publish-unit-test-result-action
  • Fix reference to non-existent github.event.workflow_run.event_path property

The publish-unit-test-result-action in workflow_run mode needs the original event file to identify the associated PR and post comments. Without it, the action creates check runs but cannot comment on PRs.

Test plan

  • Verify the CI workflow uploads the event-file artifact
  • Verify the test-results workflow downloads and uses the event file
  • Confirm PR comments appear after a test run completes

The publish-unit-test-result-action in workflow_run mode needs the
original event payload file to identify the associated PR. The CI
workflow was not uploading it, and the test-results workflow was
referencing a non-existent property (github.event.workflow_run.event_path).

Upload the event file as a separate artifact in CI and download it in
the test-results workflow so the action can correctly post PR comments.
@jbonofre jbonofre force-pushed the fix/ci-test-results-pr-comment branch from 9c0e640 to 6122da4 Compare March 19, 2026 04:20
jbonofre added a commit to jbonofre/karaf that referenced this pull request Mar 19, 2026
Backport of apache#2462 to karaf-4.4.x.

The publish-unit-test-result-action in workflow_run mode needs the
original event payload file to identify the associated PR. The CI
workflow was not uploading it, and the test-results workflow was
referencing a non-existent property (github.event.workflow_run.event_path).

Upload the event file as a separate artifact in CI and download it in
the test-results workflow so the action can correctly post PR comments.
@jbonofre jbonofre merged commit 94faf43 into apache:main Mar 19, 2026
2 checks passed
@jbonofre jbonofre deleted the fix/ci-test-results-pr-comment branch March 19, 2026 10:22
jbonofre added a commit that referenced this pull request Mar 19, 2026
Backport of #2462 to karaf-4.4.x.

The publish-unit-test-result-action in workflow_run mode needs the
original event payload file to identify the associated PR. The CI
workflow was not uploading it, and the test-results workflow was
referencing a non-existent property (github.event.workflow_run.event_path).

Upload the event file as a separate artifact in CI and download it in
the test-results workflow so the action can correctly post PR comments.
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