Skip to content

Add test reporting to pull request workflow #3747

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

Conversation

AlexandreCarlton
Copy link
Contributor

On a build with failing tests it is currently hard to see exactly which test failed.

We thus add a popular test reporter to publish JUnit test results so that they can easily be examined.

As workflows need to be approved by the maintainer to run, we will only be able to confirm whether this works once the maintainer enables this themselves.

On a build with failing tests it is currently hard to see exactly which
test failed.

We thus add a popular test reporter to publish JUnit test results so
that they can easily be examined.

As workflows need to be approved by the maintainer to run, we will only
be able to confirm whether this works once the maintainer enables this
themselves.
@bbakerman
Copy link
Member

Thanks for this. This is a thorn in all gradle users side - perhaps even maven

They both have a "report.html" which is bollocks because cloud build systems dont retain files by default - they really should provide a summary via System.out at the end of the run.

Lets see if this works well - thanks for contributing

@bbakerman
Copy link
Member

Hmm not working

Using test report parser 'java-junit'
Creating test report junit tests
  Processing test results for check run junit tests
  Creating check run junit tests
Error: HttpError: Resource not accessible by integration

We are hitting permissions errors so bumping this should rectify it.
@bbakerman
Copy link
Member

dorny/test-reporter#149

I am not at all a GitHub expert - but perhaps we need to set up "write permissions or some such"

I gather the reporter will write back on the PR maybe ??

It's not clear that we also need `actions: read` and `contents: read` -
so let's add them in one by one.
It's not obvious why these are needed (from the documentation) but it's
what the example gives, so let's provide this.
Working example found in `helm-charts graphql-java#254`.
Without this we get `Resource not accessible by integration`.
Not sure why it broke last time; let's try again to be doubly sure.
@AlexandreCarlton
Copy link
Contributor Author

I suspect this will be more complex than anticipated, reading the documentation, the example I've been using explicitly does not take with public repositories that are forked (i.e. this one).

The advised example is also not something I am after, either - it only exposes annotations after a merge has been completed (making this not suitable for my use case).

I'm a little surprised - Bitbucket Pipelines handles this almost perfectly, but I'm struggling with this one. Might need to decline this one unless you can see something I'm missing.

@dondonz
Copy link
Member

dondonz commented Nov 19, 2024

Although some of the features are only on merge, it still looks like it's better than what we have today for PRs. How about I create a non-forked branch? I'll give you commit credit though

@dondonz
Copy link
Member

dondonz commented Nov 19, 2024

Another option, this GitHub Action will comment and annotate PRs: https://github.com/EnricoMi/publish-unit-test-result-action

@dondonz
Copy link
Member

dondonz commented Nov 20, 2024

Thanks so much for giving this a try.

Inspired by you, I put up this alternate PR, with the PR test summary view #3749 Thanks for approving 😄

@dondonz dondonz closed this Nov 20, 2024
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.

3 participants