Skip to content

Introduce automated code coverage metrics for PRs #235

@kelnage

Description

@kelnage

Story (Outcome/Output) (Required)

We want our actions to be well tested, with clear indication where testing might be lacking. Introducing automated code coverage for PRs would simplify this and help reviewers understand the impact of changes.

Context

There are many different code coverage options available. Many are language specific, which may impact our choices given we have at least two languages - Go and Python (four if you could actions - but they lack unit tests 🫤)

Definition of Done (Required)

An automated code coverage job runs for each PR, allowing reviewers to easily see the affect of the PR on the test coverage compared to the current baseline and suggest potential improvements. It is not a goal to require a minimum coverage level for any change.

Implementation Plan

We currently use coveralls on pySigma-backend-loki, so that might be an obvious choice. However, it lacks first-party support for Go - a third part implementation (goveralls) exists, but has not been updated in several years. I have also noticed performance issues on occasions, especially when trying to view the line coverage data.

An alternative would be to upload the coverage data as artefacts to this repository - likely resulting in a worse user experience, but less dependent on a third party.

Dependencies (Required)

Potentially third party coverage websites

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingRelated to improving the testing of this project

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions