kishikawakatsumi / xcresulttool

A GitHub Action that generates a human-readable test report from the Xcode result bundle and shows it on GitHub Checks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to generate test report

rahulgoelsharechat opened this issue · comments

  - name: Build check
    run: |
      xcodebuild test \
      -workspace $WORKSPACE \
      -scheme $SCHEME \
      -resultBundlePath TestResults \
      -sdk iphonesimulator \
      -destination 'platform=iOS Simulator,name=iPhone 11,OS=15.0'
      -skip-testing   XYZUITests
      

- uses: kishikawakatsumi/xcresulttool@v1
    with:
      path: TestResults.xcresult
    if: success() || failure()

For above getting Annotation Errors

The 'summary' will be truncated because the character limit (65535) exceeded.

The 'summary' will be truncated because the character limit (65535) exceeded.

This is a limitation of the GitHub API. The excess text will be truncated, but a test report should be generated.

Are you running tests triggered by Pull Requests? If the Pull Request doesn't exist, then it may not have Checks.

Anyway, more information is needed.
If it's an open source repository, I'd like to see what's happening.
If it's a private repository, please add as much information as you can to show what's going on. @rahulgoelsharechat

The description of the issue is a big vague, so I'm not sure if I'm having the same issue...

However: my summary is less than 65k, doesn't get truncated. But the test report isn't generated.

Here's the branch I'm working on (sorry for the mess with the hundreds of commits, I'm still learning to use GitHub actions). In particular:

      - name: Test
        run: |
          xcodebuild -workspace SlimHUD.xcworkspace -scheme SlimHUD -destination platform=macOS -resultBundlePath TestResults test

      - name: Public test results
        uses: kishikawakatsumi/xcresulttool@v1.7.0
        if: always()
        with:
          path: "TestResults.xcresult"
          title: Coverage results
          upload-bundles: never
          show-code-coverage: true

However, as you can also see here, there are only two checks. The one with the title Coverage results never gets created.

At some point I managed to get it being created, see here. The workflow file used in this run consistently worked. Changing even just one line, in other steps of the workflow, made it fail.

Interestedly enough, this workflow now has two generated reports, one of them created an hour after the job had been run.

Looking at the source code of xcresulttool I'd expect the check with the output to be created, as soon as its step has been finished. In fact, with the workflow files that managed to create the report, it was available immediately (actually, before its completion, as soon as its step had finished).

Do you have any idea what could be causing this?


Edit / Solution

In my case the error was in the if: always(). Setting if: success() || failure() makes it always appear. Also note that it sometimes get added to other check suites.