codacy / codacy-coverage-reporter

Multi-language coverage reporter for Codacy
https://www.codacy.com
Other
134 stars 94 forks source link

[CY-2727] no report found using curl -Ls https://coverage ... #249

Closed 0LL13 closed 4 years ago

0LL13 commented 4 years ago

Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)

Ubuntu 20.04

Library Dependencies

If this is an issue that involves integration with another system, include the exact version and OS of the other system, including any intermediate drivers or APIs i.e. if you connect to a PostgreSQL database, include both the version / OS of PostgreSQL and the JDBC driver version used to connect to the database.

Expected Behavior

Please describe the expected behavior of the issue, starting from the first action. in bash shell:

  1. export CODACY_PROJECT_TOKEN=%Project_Token%
  2. change token with project API token
  3. bash <(curl -Ls https://coverage.codacy.com/get.sh)

expected that coverage report is sent to codacy ...

Actual Behavior

messages:

  1. can't find provider
  2. using commit from git
  3. Can't guess any report due to no matching! Try to specify the report with -r - (CodacyCoverageReporter.scala:25)

Reproducible Test Case

public repository github/0LL13/person

github-actions[bot] commented 4 years ago

Internal ticket created : CY-2727

josemiguelmelo commented 4 years ago

Hi,

Currently, our coverage reporter support these formats: https://github.com/codacy/codacy-coverage-reporter/blob/master/docs/index.md#supported-formats. For Python, we support Cobertura.

By checking the repository you mentioned, I noticed you’re using tox to run the tests and generate the coverage report. The command set on [testenv] section of tox.ini to run the tests is pytest --cov --cov-append --cov-report=term-missing, which generates a .coverage report. This report is not a Cobertura format and, consequently, not recognised by our tool.

To make tox generate a Cobertura XML report and make the report recognised by our tool, you need to add --cov-report xml:cobertura.xml to the command mentioned above.

Let me know if this helped. 🙂

josemiguelmelo commented 4 years ago

I'm closing this issue, but please re-open it if it didn't solve the problem.