ScaCap / action-surefire-report

Reports surefire test results as GitHub Pull Request Check
Apache License 2.0
88 stars 58 forks source link

The same workflow for `push` and `pull_request` doesn't produce "Test Report" when run on `pull_request` #50

Open skarakhanov opened 3 years ago

skarakhanov commented 3 years ago

Hi! I've got a workflow which worked just fine on push. But when I tried to add a pull_request trigger, it didn't produce "Test Report" with error annotations. To clarify more, in my configuration exactly the same workflow causes two builds to be run. One of these builds (on push) ends up with "Test Report" present but the other one (on pull_request) doesn't have "Test Report". Project is Java, built with Gradle.

mustaphazorgati commented 3 years ago

Hey @jmisur, I have the same issue on this workflow: https://github.com/Taskana/taskana/runs/2138524231?check_suite_focus=true It works fine for master builds but it seems to now have permissions on pull requests. Error: Resource not accessible by integration. Is there anything we can do about this?

jmisur commented 3 years ago

I really don't have an idea what could be the problem. We're successfully using it for PRs and for master builds. Of course it doesn't work for forked repos but that's a different problem. Are you using default github token provided by workflow? https://docs.github.com/en/actions/reference/authentication-in-a-workflow

mustaphazorgati commented 3 years ago

Hey @jmisur, thanks for the reply.

Of course it doesn't work for forked repos but that's a different problem.

We have the authentication issue because we work fork-based. I assume that @skarakhanov has the same issue. Is there anything we can do about it or do we have to wait until GitHub releases some changes regarding authentication on forks?

skarakhanov commented 3 years ago

I have to add that for me this problem self-resolved at some point. I just gave up trying to fix it and several days later we noticed that we do have test reports in our PRs. Something might have happened on GitHub side.