Skip to content

Fix codecov 0% issue by using pytest-cov  #30

@bobleesj

Description

@bobleesj

@Tieqiong

Can we try to implement the below change?


We shall use pytest-cov instead of using coverage to run pytest. The previous codecov 0% error occurred because the tests folder has been moved to the top directory level and coverage isn't able to import diffpy. due to the namespace.

So the GH actions can be modified

from:

        run: |
          coverage run -m pytest -vv -s
          coverage report -m
          codecov

to:

        run: |
          pytest --cov
          coverage report -m
          codecov

Reference:

Two more things to confirm with you:

I will also update .coveragerc to remove the source section.

Reference:

I will include pytest-cov in the test.txt dependency list.

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