Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error: Validation Failed #161

Closed
arcuri82 opened this issue May 23, 2023 · 4 comments · Fixed by #164
Closed

Error: Validation Failed #161

arcuri82 opened this issue May 23, 2023 · 4 comments · Fixed by #164

Comments

@arcuri82
Copy link

Hi,
trying to use this action. Added it with:

      - name: Publish Test Report
        if: success() || failure()
        uses: scacap/action-surefire-report@v1

however, no test report is created. I get the following in the logs of the action:

Result: 4522 tests run, 28 skipped, 6 failed.
Posting status 'completed' with conclusion 'failure' to refs/heads/minimize (sha: d343f8acf441370d10b7c74c4bad42f46c2fd404)
Error: Validation Failed: {"resource":"CheckRun","code":"invalid","field":"annotations"}

currently running on a branch. Am I doing something wrong? or is it a bug?

@ghaiszaher
Copy link
Member

@arcuri82 is this easily reproducible on some public repository? I can only imagine that permissions are missing:

    permissions:
      checks: write
      contents: read
    steps:
      - name: Publish Test Report
        if: success() || failure()
        uses: scacap/action-surefire-report@v1

Also see https://github.com/ScaCap/action-surefire-report#example-usage

@arcuri82
Copy link
Author

arcuri82 commented Jun 2, 2023

thanks for the reply. However, since I reported this issue I have been trying other alternatives as well, and in the end the following worked for me:

      - name: Publish Test Report
        if: success() || failure()
        uses: mikepenz/action-junit-report@v3
        with:
          report_paths: '**/target/surefire-reports/TEST-*.xml'

the repository I am using is EvoMaster, which is public

@ghaiszaher
Copy link
Member

I was able to reproduce a similar case because the annotation message was empty. Attempt to fix: #164

If you face the same issue again, please rerun the job with debug enabled to get more insights.

ghaiszaher added a commit that referenced this issue Jul 18, 2023
@ghaiszaher ghaiszaher linked a pull request Jul 18, 2023 that will close this issue
@ghaiszaher
Copy link
Member

I will close this issue as fixed with #164, feel free to reopen if you still face it with the latest version.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants