Skip to content

codecov-action with coverage package #116

Closed

Description

@PrimozGodec

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.

Activity

  1. thomasrockhu commented on Aug 18, 2020

    @thomasrockhu
    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

  2. PrimozGodec commented on Aug 19, 2020

    @PrimozGodec
    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?

  3. thomasrockhu commented on Aug 19, 2020

    @thomasrockhu
    Contributor

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

  4. thomasrockhu commented on Aug 20, 2020

    @thomasrockhu
    Contributor
  5. PrimozGodec commented on Aug 20, 2020

    @PrimozGodec
    Author

    Thank for the update. 👍

  6. thomasrockhu commented on Aug 25, 2020

    @thomasrockhu
    Contributor

    Closing this as codecov-python has been updated

  7. PrimozGodec commented on Aug 25, 2020

    @PrimozGodec
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions