pytest-coverage-commentator icon indicating copy to clipboard operation
pytest-coverage-commentator copied to clipboard

Errors during `Build coverage file`

Open akzaidi opened this issue 3 years ago • 1 comments

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!

akzaidi avatar Apr 06 '21 23:04 akzaidi

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

MishaKav avatar Jun 02 '21 20:06 MishaKav