A quick and dirty helper script to convert a xml coverage report
Project description
gitlab-ci-scripts
A quick and dirty helper script to convert a xml coverage report into a valid cobertura file that will be accepted by GitLab CI.
This enables the merge request pages to have coverage shown on the code review tab.
Installation from PyPI
You can install the latest version from PyPI package repository.
python3 -mpip install -U gitlab-ci-scripts
GitLab CI Usage
Sample gitlab-ci.yml snippet for coverage:
coverage:
script:
- python3 -m pytest --cov-report=xml:coverage.tmp.xml -- tests
- pycov-convert-relative-filenames < coverage.tmp.xml > coverage.xml
artifacts:
when: always
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
License
This project is licensed under the MIT License - see the LICENSE file for details.
Locations
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gitlab_ci_scripts-1.2.3.tar.gz
.
File metadata
- Download URL: gitlab_ci_scripts-1.2.3.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b26deb700f5c84f736d8214fa283ce808bad36ef5b2efee34b93e4f6d287fdb |
|
MD5 | 8956c52bf521427836a0408bb0c1f662 |
|
BLAKE2b-256 | 1ffff6cba29d83bfd295292e2af1f1fda09b36f991ccc6eb0a128b9b619b13a6 |
File details
Details for the file gitlab_ci_scripts-1.2.3-py2.py3-none-any.whl
.
File metadata
- Download URL: gitlab_ci_scripts-1.2.3-py2.py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4b8e76f11b3eb597bd5d7bbcd7bb54dc67101746a73c126b963dc760688552b |
|
MD5 | 2aedde765b88a06d5c4d3a0f4d2fc004 |
|
BLAKE2b-256 | fb2407d3bafa1baf702f8f37c54eb3d620a932e6a82649aba804e323b4a8193e |