Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only publish test results if triggering workflow was triggered by PR #2922

Conversation

johannaengland
Copy link
Contributor

Tested in my own private repo, both with a succeeding triggering workflow as well as a failing triggering workflow.

Reverts #2914.

Reference:
https://docs.github.com/en/webhooks/webhook-events-and-payloads#workflow_run (See: Properties of workflow_run)

@johannaengland johannaengland requested a review from lunkwill42 May 16, 2024 12:28
@johannaengland johannaengland self-assigned this May 16, 2024
Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.25%. Comparing base (1aec729) to head (e5d3f47).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2922   +/-   ##
=======================================
  Coverage   60.25%   60.25%           
=======================================
  Files         602      602           
  Lines       44084    44084           
=======================================
  Hits        26565    26565           
  Misses      17519    17519           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lunkwill42
Copy link
Member

lunkwill42 commented May 16, 2024

Actually, I think we should maybe revert #2914 fully, and put #2862 on standby.

It seems that the test result publisher is indeed able to publish test results on the actions page when there is no PR associated with a commit. It's not that we want to avoid the test report, we want the reports - it's just that we thought there was nowhere to actually post it when there was no PR.

The confusing factor here is that the action fails, even if the results are published - apparently as it is trying to find a PR associated with the commit hash of the triggering commit.

Example in question: https://github.com/Uninett/nav/actions/runs/9063635622

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