Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

Enables workflows to programmatically access test report URLs for linking in PR comments or cross-workflow coordination.

Changes

  • New output report_url: Contains newline-separated URLs of all created test reports
  • Implementation: Extracts URLs from existing CheckInfo objects populated during check creation
  • Tests: Validates single URL, multiple URLs, and empty array cases

Usage

- uses: mikepenz/action-junit-report@v5
  id: test-report
  with:
    report_paths: '**/test-results/*.xml'

- name: Link to test report
  run: |
    echo "Results: ${{ steps.test-report.outputs.report_url }}"

For multiple reports, URLs are newline-separated and can be processed with standard shell tools.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add test report URL(s) as job output</issue_title>
<issue_description>We have a complex CI setup that spawns several workflows and collects their statuses in a single comment on each PR. Each of these workflows has their own test report created from this action. In this comment, it would be nice to be able to add a link to each workflow's test report as they become available.

I see that there is already a summary output, but this only contains the table; the link to the test report is added separately when creating the annotation. I'd like to request that there be an additional output that provides the URLs of all the test reports (in our case, there's just one, but I see that there can potentially be many).</issue_description>

Comments on the Issue (you are @copilot in this section)

@mikepenz Thanks for the suggestion. I feel like that would be a great addition. This sounds like a great issue for a first contribution ✨

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 1, 2025 07:04
Co-authored-by: mikepenz <1476232+mikepenz@users.noreply.github.com>
Co-authored-by: mikepenz <1476232+mikepenz@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Nov 1, 2025

TestsPassed ☑️SkippedFailed ❌️
Example Pytest Report4 ran2 passed0 skipped2 failed
TestResult
Example Pytest Report
test_sample.test_which_succeeds✅ passed
test_sample.test_which_fails❌ failure
test_sample.test_with_error❌ failure
test_sample.test_with_flaky_success✅ passed
@github-actions
Copy link

github-actions bot commented Nov 1, 2025

TestsPassed ☑️Skipped ⚠️Failed ❌️
Example Ungrouped Test Report | test_10.xml3 ran3 passed0 skipped0 failed
Example Ungrouped Test Report | test_11.xml3 ran2 passed0 skipped1 failed
Example Ungrouped Test Report | test_12.xml3 ran2 passed1 skipped0 failed
@github-actions
Copy link

github-actions bot commented Nov 1, 2025

TestsPassed ✅SkippedFailed
Example Nested JUnit Test Report3 ran3 passed0 skipped0 failed
TestResult
Example Nested JUnit Test Report
ABC-0199: XMPP Ping
PingIntegrationTest.pingAsync (Normal)✅ passed
PingIntegrationTest.pingServer (Normal)✅ passed
ABC-0045: Multi-User Chat
MultiUserIntegrationTest.mucRoleTestForReceivingModerator (Normal)✅ passed
Copilot AI changed the title [WIP] Add test report URLs as job output Nov 1, 2025
Copilot AI requested a review from mikepenz November 1, 2025 07:08
Copilot finished work on behalf of mikepenz November 1, 2025 07:08
@mikepenz mikepenz marked this pull request as ready for review November 1, 2025 07:16
@mikepenz mikepenz merged commit f210c12 into main Nov 1, 2025
7 of 13 checks passed
@mikepenz mikepenz deleted the copilot/add-test-report-url-output branch November 1, 2025 07:20
Copy link

@brettdh brettdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikepenz thanks for the quick turnaround on this as usual! It looks like this was a very simple update, but the tests that Copilot are a bit... lacking. 😁

}
]

const reportUrls = checkInfos.map(info => info.url).join('\n')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this is just testing that Array.join works?

Comment on lines +37 to +41
const reportUrls = checkInfos.map(info => info.url).join('\n')
expect(reportUrls).toBe(
'https://github.com/owner/repo/runs/123\nhttps://github.com/owner/repo/runs/456\nhttps://github.com/owner/repo/runs/789'
)
})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, this isn't testing the action; just the JavaScript stdlib.

Comment on lines +46 to +47
const reportUrls = checkInfos.map(info => info.url).join('\n')
expect(reportUrls).toBe('')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

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

Labels

3 participants