coroo / pytest-coverage-commentator

A Github action to comments a Pytest Coverage on PR
MIT License
45 stars 16 forks source link

Errors during `Build coverage file` #83

Open akzaidi opened 3 years ago

akzaidi commented 3 years ago

Thanks for the workflow template! It is exactly what I was looking for.

Unfortunately, I'm hitting the following error when getting to the Build coverage file:

  python -m pytest --cov='.' tests > pytest-coverage.txt
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.8.8/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.8/x64/lib
Error: Process completed with exit code 2.

The repository I'm trying to add this workflow to is here.

Any idea what I'm doing wrong? I tried with and without the python -m. My tests are in the tests folder and all the source code is in the top-directory. The tests run fine locally on my machine, but not within the workflow scripts.

Any help would be appreciated. Thanks!

MishaKav commented 3 years ago

Found a solution on similar GitHub Action: Pytest Coverage Comment you can give it a try.