MishaKav / pytest-coverage-comment

Comments a pull request with the pytest code coverage badge and full report

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coverage file wouldn't created.

ChehST opened this issue · comments

I've tried add comment covarege but no comment with report was generated. At workflow debugger i've find this output...

Run pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=app Parser/tests/ | tee pytest-coverage.txt
  
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --cov-report=term-missing:skip-covered --cov=app
  inifile: /home/runner/work/CI-CD-pipeline/CI-CD-pipeline/Parser/pytest.ini
  rootdir: /home/runner/work/CI-CD-pipeline/CI-CD-pipeline/Parser

I've try run pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=app Parser/tests/ | tee pytest-coverage.txt
and catch some errors. With these commands file wouldn't create! And it will influence on next steps

I mean that README description is misleading users to use pytest with incorrect arguments

pytest==8.1.1

I realized that both options are possible. I was unaware of the pytest-cov plugin.
However, I did not find any mention of the package version requirements.

Mb it would be good idea to add check project's requirement file or any way to understend which keys to use - native from pytest or pytest-cov's plugin