ClickHouse / ClickHouse/dbt-clickhouse

Get coverage reports from test execution

Open
#626 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
362
Forks
177
Avg merge
2d 10h
Merged PRs (30d)
8

Description

We don't currently report coverage from test executions and it should be easy to integrate:

Right now we should be able to generate coverage reports by installing https://coverage.readthedocs.io/en/7.13.5/ and adding to each test execution:
```sh
coverage run -m pytest ...
```

The generated file can be reviewed locally with:
```sh
# Nice html view
coverage html
# Coverage per module
coverage report
```

We should be able to also use these coverages files with Codecov in the same way as some of our current repositories like [clickhouse-rs](https://github.com/ClickHouse/clickhouse-rs/commit/56c5dd3fc95693acc5aa3d02db1f910a26fe5b1c) or [clickhouse-js](https://github.com/ClickHouse/clickhouse-js/blob/22e8610f8731bc7dfd24eeb9c08de1b2a17b0c94/.github/workflows/tests.yml#L474)

Contributor guide

Open the contributing guide

Research direction

Start by locating this repository's test execution configuration and compare it with the referenced clickhouse-js .github/workflows/tests.yml example. Add coverage run -m pytest to the relevant executions, then verify that coverage html and coverage report work locally and that the generated files can be uploaded to Codecov.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ci-cd, testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.