diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-28 12:24:19 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-28 12:24:19 +0000 |
commit | 72cb3bee798655c2d370dfedf3c04665aaa43aa3 (patch) | |
tree | 4f57c272abd6067ed3dfdf38bca9220b3ea13bf5 /doc/ci/testing | |
parent | 70c1d0352e39c3c04caaa3082c3ffb4ad5c29b32 (diff) | |
download | gitlab-ce-72cb3bee798655c2d370dfedf3c04665aaa43aa3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/ci/testing')
-rw-r--r-- | doc/ci/testing/test_coverage_visualization.md | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/doc/ci/testing/test_coverage_visualization.md b/doc/ci/testing/test_coverage_visualization.md index 94ee4d2dce2..31d1b7f3337 100644 --- a/doc/ci/testing/test_coverage_visualization.md +++ b/doc/ci/testing/test_coverage_visualization.md @@ -274,10 +274,7 @@ coverage-jdk11: ### Python example -The following [`.gitlab-ci.yml`](../yaml/index.md) example for Python uses [pytest-cov](https://pytest-cov.readthedocs.io/) to collect test coverage data and [coverage.py](https://coverage.readthedocs.io/) to convert the report to use full relative paths. -The information isn't displayed without the conversion. - -This example assumes that the code for your package is in `src/` and your tests are in `tests.py`: +The following [`.gitlab-ci.yml`](../yaml/index.md) example uses [pytest-cov](https://pytest-cov.readthedocs.io/) to collect test coverage data: ```yaml run tests: @@ -285,9 +282,7 @@ run tests: image: python:3 script: - pip install pytest pytest-cov - - coverage run -m pytest - - coverage report - - coverage xml + - pytest --cov --cov-report term --cov-report xml:coverage.xml coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' artifacts: reports: |