Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage file wouldn't created. #163

Open
ChehST opened this issue Apr 23, 2024 · 1 comment · May be fixed by #164
Open

Coverage file wouldn't created. #163

ChehST opened this issue Apr 23, 2024 · 1 comment · May be fixed by #164

Comments

@ChehST
Copy link

ChehST commented Apr 23, 2024

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

ChehST added a commit to ChehST/pytest-coverage-comment that referenced this issue Apr 23, 2024
@ChehST ChehST linked a pull request Apr 23, 2024 that will close this issue
@ChehST
Copy link
Author

ChehST commented Apr 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant