Skip to content

Generate coverage results and upload to codecov #33355

@tobiasdiez

Description

@tobiasdiez

Use coverage.py to generate coverage results for the sage source code based on the test execution. In contrast to sage's naïve coverage tool, this not only looks for the existence of doctests for a method but actually measures which lines are actually executed by the tests.

These coverage results are then uploaded to codecov, where one can inspect the results. See https://codecov.io/gh/sagemath/sagetrac-mirror/tree/ec045eb0168b937e35375e803979975df4aa6564/src/sage for the current coverage. Codecov also displays the coverage of changed files, so that one can easily check if changes are indeed covered by tests. An example would be https://codecov.io/gh/sagemath/sagetrac-mirror/commit/ec045eb0168b937e35375e803979975df4aa6564 but there are of course no changes in python files in this ticket, so it shows nothing interesting. For a more interesting example from a different project see eg https://app.codecov.io/gh/JabRef/jabref/commit/2494509f2d75426bd7369b358880e7ffed2a47b4. The idea would be to add the link to such a report as a new badge in the trac ticket (after this ticket here is merged).

Run: https://github.com/sagemath/sagetrac-mirror/actions/workflows/build.yml?query=branch%3Apublic/build/codecov

CC: @mkoeppe

Component: build

Author: Tobias Diez

Branch: ec045eb

Reviewer: Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/33355

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions