ScaCap / action-surefire-report

Reports surefire test results as GitHub Pull Request Check
Apache License 2.0
88 stars 59 forks source link

Cannot parse surefire-report XML #43

Closed mustaphazorgati closed 3 years ago

mustaphazorgati commented 3 years ago

When using this action with this configuration:

- name: Publish Test Report
  if: failure()
  uses: scacap/action-surefire-report@v1
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    check_name: Test Report for ${{ matrix.module }} on ${{ matrix.database }}
    fail_if_no_tests: false

We get the following error:

Run scacap/action-surefire-report@v1
Going to parse results form **/surefire-reports/TEST-*.xml
 **/failsafe-reports/TEST-*.xml
Error: ((testcase.failure && testcase.failure._cdata) || (testcase.failure && testcase.failure._text) || (testcase.error && testcase.error._cdata) || (testcase.error && testcase.error._text) || "").trim is not a function

example build: https://github.com/mustaphazorgati/taskana/runs/1818385382?check_suite_focus=true

XML Report (extracted from the example build): surefire-xml-report.zip

jmisur commented 3 years ago

Released https://github.com/ScaCap/action-surefire-report/releases/tag/v1.0.6 and linked v1 to it. Please check.

mustaphazorgati commented 3 years ago

Works like a charm! Thank you!