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

Check is put into the wrong workflow group #488

Closed
janpapenbrock opened this issue Aug 22, 2023 · 4 comments
Closed

Check is put into the wrong workflow group #488

janpapenbrock opened this issue Aug 22, 2023 · 4 comments

Comments

@janpapenbrock
Copy link

janpapenbrock commented Aug 22, 2023

Thanks for this helpful action!

The automatically created check gets put into the wrong "workflow group" in our PR checks (not sure how this "workflow group" is called actually).

So we have these outputs in our PR checks:

  1. Automatic PR Unit Tests / app-unit-tests (pull_request) Successful in 6m
  2. Automatic PR Unit Tests / publish-unit-test-results (pull_request) Successful in 17s
  3. Lint / ESLint (pull_request) — No issues
  4. Lint / Test Results (pull_request) — All 544 tests pass, 15 skipped in 4m 34s

The last check, Test Results, is created by this action and is put into Lint /, while it should be put into Automatic PR Unit Tests /. Is there a way to control that? Looks incorrect to me. Also we don't seem to re-use the name Test Results, so I don't think we have a duplication / conflict.

This is the config we're using:

name: 'Automatic PR Unit Tests'

[...]

      - name: Publish Unit Test Results
        uses: EnricoMi/publish-unit-test-result-action@v2
        if: always()
        with:
          files: TESTS.xml

This is the log:

Run EnricoMi/publish-unit-test-result-action@v2
  with:
    files: TESTS.xml
    github_token: ***
    github_token_actor: github-actions
    github_retries: 10
    check_name: Test Results
    comment_mode: always
    fail_on: test failures
    action_fail: false
    action_fail_on_inconclusive: false
    time_unit: seconds
    report_suite_logs: none
    ignore_runs: false
    job_summary: true
    compare_to_earlier_commit: true
    pull_request_build: merge
    check_run_annotations: all tests, skipped tests
    seconds_between_github_reads: 0.25
    seconds_between_github_writes: 2.0
    json_thousands_separator:  
    json_suite_details: false
    json_test_case_results: false
    search_pull_requests: false
/usr/bin/docker run [...] ghcr.io/enricomi/publish-unit-test-result-action:v2.9.0
2023-08-22 20:16:36 +0000 - publish -  INFO - Available memory to read files: 5.8 GiB
2023-08-22 20:16:36 +0000 - publish -  INFO - Reading files TESTS.xml (1 file, 155.4 KiB)
2023-08-22 20:16:36 +0000 - publish -  INFO - Detected 1 JUnit XML file (155.4 KiB)
2023-08-22 20:16:36 +0000 - publish -  INFO - Finished reading 1 files in 0.00 seconds
2023-08-22 20:16:36 +0000 - publish -  INFO - Publishing success results for commit [...]
2023-08-22 20:16:37 +0000 - publish -  INFO - Created check https://github.com/[...]/[...]/runs/[...]
2023-08-22 20:16:37 +0000 - publish -  INFO - Created job summary
2023-08-22 20:16:42 +0000 - publish -  INFO - Created comment for pull request #1234: https://github.com/[...]/[...]/pull/1234#issuecomment-123123123

@janpapenbrock janpapenbrock changed the title Check is put into the wrong group Check is put into the wrong workflow group Aug 22, 2023
@janpapenbrock
Copy link
Author

Just looked into how the other GH Action is publishing the check run and I cannot see any parameter to pass the workflow as a context - but I'm not an expert.

Maybe this still helps for reference: https://github.com/wearerequired/lint-action/blob/616f7ec78337552e970cf4879a3a5a042a7eb9e6/src/github/api.js

@EnricoMi
Copy link
Owner

This is a known limitation of the Checks API of Github.

See #12 and the full story at https://github.com/orgs/community/discussions/24616.

@janpapenbrock
Copy link
Author

Thanks for the response and the hint to #12. Didn't know how things were called and hence could not search properly for existing issues :)

Also read your comment at https://github.com/orgs/community/discussions/24616#discussioncomment-6088422. How GitHub handles this issue seems a bit weird to me, to say the least. Not too much hope that it gets resolved after 3+ years, while it seems such a simple request 🤷

Well, thanks for your time in providing this action and also responding to my request here! Cheers


Closed as duplicate of #12.

@janpapenbrock
Copy link
Author

(Haha, just wanted to suggest pinning #12 to the top of the repo issues, just to see that you already did that before and I didn't see it. Lesson learned for me).

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

No branches or pull requests

2 participants