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

codecov-action with coverage package #116

Closed
PrimozGodec opened this issue Aug 18, 2020 · 7 comments
Closed

codecov-action with coverage package #116

PrimozGodec opened this issue Aug 18, 2020 · 7 comments

Comments

@PrimozGodec
Copy link

I am trying to introduce codecov-action in our project.. We generate report via coverage package:

coverage run -m unittest --verbose Orange.tests Orange.widgets.tests
coverage combine
coverage report

which produces the report in .coverage file. Before we used Travis and we just uploaded the report with codecov command. With codecov-action I added the following section to one of the workflows:

- name: Upload code coverage
      if: matrix.python == '3.7'
      uses: codecov/codecov-action@v1
      with:
          file: .coverage

It seems that it uploads the report but something is wrong with the report and error message does not tell anything: There was an error processing coverage reports. Here is the link to the error/report: https://codecov.io/github/biolab/orange3/commit/9f5fea156917ba0772a059771092c9480b387c07

I think that the format of the report file is wrong since in the documentation there is the report in XML format, but I also cannot find how to produce the report in the correct format with coverage package.

@thomasrockhu
Copy link
Contributor

@PrimozGodec it looks like you are uploading a sqlite file instead of a coverage file as you mentioned above.

We have an example here. You might not need coverage combine and coverage report, as Codecov handles combining the coverage reports. You might then also not need to specify the file

@PrimozGodec
Copy link
Author

Thank you for the response. The example shows how to upload coverage whit Travis and codecov package. It is how we used to upload reports before. Since we are moving to GH Actions and codecov does not upload without token on GH Actions. We now try to use codecov-action.

Is there any example of how to use codecov-action in combination with coverage package? Which file is the report I which I need to upload?

@thomasrockhu
Copy link
Contributor

@PrimozGodec fair enough. I'll update the python codecov package to support GH Actions.

@thomasrockhu
Copy link
Contributor

@PrimozGodec
Copy link
Author

Thank for the update. 👍

@thomasrockhu
Copy link
Contributor

Closing this as codecov-python has been updated

@PrimozGodec
Copy link
Author

Thank you. I can confirm it works. :)

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

No branches or pull requests

2 participants