I am following the following tutorial to create code coverage report: Publish code coverage report with GitLab Pages
My .gitlab-ci.yml
file looks same as in the tutorial, except that I am doing it in python
image: ubuntu:18.04
variables:
CODECOV_TOKEN: $CODECOV_TOKEN
stages:
- coverage
- deploy
coverage:
stage: coverage
before_script:
- apt-get -y update
- apt-get -y install curl python3-pip python3.7 zip
- python3.7 -m pip install --upgrade pip
- python3.7 -V
- pip3.7 install -r requirements.txt
script:
- coverage run -m pytest
- coverage report -m
- coverage html
artifacts:
paths:
- htmlcov/
pages:
stage: deploy
dependencies:
- coverage
script:
- mv htmlcov/ public/
artifacts:
paths:
- public/
When the .yml
file is run, it creates an artifact named public
This folder contains
index.html
whose contents are
Now, I want to have 52% as a coverage badge in the repo. From the tutorial above, I would like to know which link should I use so that I can get the badge in the repo. In the tutorial, under Using the code coverage report badge section, they have a markdown source
[![Coverage report](https://gitlab.com/gitlab-org/gitlab-ce/badges/master/coverage.svg?job=coverage)](http://gitlab-org.gitlab.io/gitlab-ce/coverage-ruby)
I am a bit confused as to what these links are and thus would like to know what would this be for my project?