Introduce coverage report generation and generate GitLab coverage badge via GitLab feature
Duniterpy display a badge in Gitlab for tests coverage, but it is broken.
This badge depends on an old cloud service workflow involving github, coveralls.io and maybe via travis. But the workflow is not working anymore.
We can repair the broken badge without any cloud platform, by following this method :
https://stackoverflow.com/questions/50883112/code-coverage-in-gitlab-ci-cd
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Vincent Texier added To Do enhancement labels
added To Do enhancement labels
- Moul mentioned in merge request !69 (closed)
mentioned in merge request !69 (closed)
- Vincent Texier changed milestone to %0.56.0
changed milestone to %0.56.0
- Vincent Texier assigned to @vtexier
assigned to @vtexier
- Vincent Texier added ~197 label and removed enhancement label
added ~197 label and removed enhancement label
- Moul mentioned in issue #103 (closed)
mentioned in issue #103 (closed)
Here is the solution used by Silkaj project with
coverage-badge
.It requires Pytest,
pytest-cov
generates the coverage, and from that coverage,coverage-badge
generates this badge.In the end, the coverage static web pages and the badge are stored as artefacts and then deployed to the GitLab pages.
Edited by Moul- Author Owner
From what I understand of the stackoverflow solution, we do not need to add another dependency just for the badge.
- Author Owner
The problem seems to be in the nginx configuration which fail to publish static assets from gitlab. It is visible in pages (no static assets available).
It is more tricky here as my tests should work but the badge url return 404...
So I report this to a future release, when nginx configuration will be fixed...
- Moul mentioned in issue silkaj#326 (closed)
mentioned in issue silkaj#326 (closed)
- Moul changed title from Repair gitlab tests coverage badge to Repair GitLab tests coverage badge
changed title from Repair gitlab tests coverage badge to Repair GitLab tests coverage badge
- Moul marked this issue as related to silkaj#326 (closed)
marked this issue as related to silkaj#326 (closed)
- Moul changed title from Repair GitLab tests coverage badge to Introduce coverage report generation and generate GitLab coverage badge via GitLab feature
changed title from Repair GitLab tests coverage badge to Introduce coverage report generation and generate GitLab coverage badge via GitLab feature
- Moul mentioned in merge request !133 (merged)
mentioned in merge request !133 (merged)
- Moul marked this issue as related to #103 (closed)
marked this issue as related to #103 (closed)
- Moul closed with merge request !133 (merged)
closed with merge request !133 (merged)