-
Notifications
You must be signed in to change notification settings - Fork 212
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 Reporter fails on workflow_run #343
Comments
I noticed something similar. Here's one of my public repos where it goes wrong (with a similar config as you have): fsprojects/FSharp.Control.TaskSeq#209. I.e., it looks as if it is hanging, but it simply doesn't run anymore (there have not been any changes in the workflow config): I suspect EDIT, we are not alone in this, see this long thread: actions/upload-artifact#472 |
Yep, this confirms it. The new |
Yes, this caused by different behavior in artifacts v4: https://github.blog/changelog/2023-12-14-github-actions-artifacts-v4-is-now-generally-available/ |
@jozefizso are you aware of any way to fix this? Would it require bumping the major version here as well, or could it be made compatible with either? |
Seems to be generally broken with the test report action dorny/test-reporter#343
FYI I was able to make this work using a similar on:
workflow_run:
workflows: ["test"]
types:
- completed
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
pattern: test-result-*
merge-multiple: true
run-id: ${{ github.event.workflow_run.id }}
- name: Generate report
uses: dorny/test-reporter@v1
with:
name: test report
path: "*.trx"
reporter: dotnet-trx You have to generate your own |
The github token @SapiensAnatis mentions needs to have the permission actions:read on target repo. @jozefizso @abelbraaksma Would this mean that the fix for this problem in the action will need a token as well? |
@fernandopasik I'm not sure, but it might very well be? If you want me to test a fix (I assume you'd do that in a new version as it'll introduce an incompatibility, I guess), let me know and I can run a test through fsprojects/FSharp.Control.TaskSeq#245). |
dorny/test-reporter#343 Run-GHA: true RPM-test-version: 2.5.101 Skip-func-hw-test: true Test-tag: always_passes Required-githooks: true Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
I tried downgrading my (test) artifact upload from v4 to v3: - uses: actions/upload-artifact@v4
+ # Don't bump this to v4 due to https://github.com/dorny/test-reporter/issues/343
+ uses: actions/upload-artifact@v3 but now this action is complaining that it cannot find any matching artifacts:
Yet when I uploaded with
And the artifact RE that it's complaining there were no matches on would certainly match uploaded artifacts:
So is simply downgrading the |
So given that it's 4 months on since the above comment, what's the plan to fix this? How is this action in any way usable given this issue? I.e. isn't is completely broken at this point now? Or does this issue only affect certain use cases of this action? If so, which use cases are still working? |
It is actually
Simply downgrading should be enough. See the breaking changes here: https://github.com/actions/upload-artifact?tab=readme-ov-file#breaking-changes Even if you applied fixes, it looks like any changes you did to accommodate v4, would work with v3. I think the main issue is same-named artifacts, which don't work anymore. |
It is not. As I previously said, it produces this failure:
when the artifact list clearly has artifacts that match the RE:
They don't have the same name though. One has |
See also #363 |
I was running into this issue today as well, although I don't have a repository using this action myself. The following configuration seems to work: Show working example for test-report workflow (according to my tests)name: Test Report
run-name: >
Test Report for ${{ github.event.workflow.name }}
#${{ github.event.workflow_run.run_number }}:
${{ github.event.workflow_run.display_title }}
on:
workflow_run:
workflows: [Build]
types: [completed]
# Permissions only have to be specified when set to be restricted by default.
# Otherwise, the workflow will have all necessary permissions by default.
# See https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
permissions:
checks: write
# The documentation mentions that the following permissions is necessary to access other workflow runs.
# However, the workflow seems to work even without this permission.
# Maybe there is a special case which always allows access to the workflow run which triggered this run.
actions: read
jobs:
report:
name: Test Report
runs-on: ubuntu-latest
steps:
# We have to clone the repo as the test-reporter otherwise runs into an error.
# See https://github.com/dorny/test-reporter/issues/131#issuecomment-2093880211
- name: Fetch Sources
uses: actions/checkout@v4
# We have to manually download the artifact because dorny/test-reporter@v1
# does not support artifacts uploaded by actions/upload-artifact@v4.
# See https://github.com/dorny/test-reporter/issues/343
- name: Download Test Reports
uses: actions/download-artifact@v4
with:
pattern: test-results-*
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
- name: Publish Test Reports as Annotations
uses: dorny/test-reporter@v1
with:
name: "Unit Tests Report"
path: "test-results-*/test-results/*/TEST-*.xml"
reporter: java-junit
You can use the token provided by GitHub Actions ( |
FYI, I created a pull request, which I think should fix this issue. |
FIY again, I also created a feature request for support of |
Seems to be generally broken with the test report action dorny/test-reporter#343
I have two step
and
trx file is successfully uploaded, inspecting the URL of test reporter action, it offers me to download the file, but the action fails
Report fails with error
HTTPError: Response code 400 (Authentication information is not given in the correct format. Check the value of Authorization header.)
Additional info: it worked, but after I bumped the version of the upload-artifacts (among other), somehow stopped working...
The text was updated successfully, but these errors were encountered: