Skip to content

Draft: Resolve "merge request code coverage CLI helper"

Flavien BRIDAULT requested to merge 79-merge-request-code-coverage-cli-helper into dev

Description

A new CLI is available, sight-cov.py. Here is the synopsis:

usage: sight-cov.py [-h] [-d] [--html] repository merge-request

Download the code coverage report from the latest pipeline of a merge-request.

positional arguments:
  repository     Name of the repository: "sight", "night", or any private repository.
  merge-request  Identifier of the merge-request, same as the one present in its URL.

options:
  -h, --help     show this help message and exit
  -d, --diff     Compute the diff of the coverage with the dev branch.
  --html         Html output instead of text.

Results

# ~/dev/sight/sight-git/sight-cov.py -d sight 470 --html 
Downloading merge-request !470 artifacts for project sight...

Coverage report is available at:
file:///home/user/dev/sight/.coverage/sight%21470%23301939/coverage/index.html

Downloading dev branch artifacts for project sight

Diff coverage report is available at:
file:///home/user/dev/sight/.coverage/report.html

How to test it?

Run the command in the root of one of your git repositories, and try the script with an existing merge-request.

Related issue(s)

Closes #79

Edited by Flavien BRIDAULT

Merge request reports