pmeier / pytest-results-action

Summarize `pytest` test results in GitHub Actions
BSD 3-Clause "New" or "Revised" License
13 stars 6 forks source link

nodejs TypeError when running pytest-results-action #20

Open matiaskotlik opened 6 months ago

matiaskotlik commented 6 months ago

Running the action on my results.xml gives this:


Run pmeier/pytest-results-action@main
  with:
    path: server/test-results.xml
    summary: true
    display-options: fEX
    fail-on-empty: true
    title: Test results
  env:
    PATH: /home/shade/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
    PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring
/REDACTED/actions-runner/_work/_actions/pmeier/pytest-results-action/main/dist/index.js:7313
      resultTypeArray.push({
                      ^

TypeError: Cannot read properties of undefined (reading 'push')
    at extractResults (/REDACTED/actions-runner/_work/_actions/pmeier/pytest-results-action/main/dist/index.js:7313:23)
    at async postResults (/REDACTED/actions-runner/_work/_actions/pmeier/pytest-results-action/main/dist/index.js:7247:19)
    at async main (/REDACTED/actions-runner/_work/_actions/pmeier/pytest-results-action/main/dist/index.js:7614:3)

Node.js v20.8.1```
matiaskotlik commented 6 months ago

Using module-level pytest.skip causes this: https://docs.pytest.org/en/latest/how-to/skipping.html#skipping-test-functions

pmeier commented 6 months ago

Could you post the xml?