Skip to content
Snippets Groups Projects
Commit d063c4ec authored by Moul's avatar Moul
Browse files

(ci) Add coverage integration into GitLab (#195, #167)

Add coverage keyword and regex
Before GitLab v15.0, it used to be into the project settings
now, it’s into the CI config
This fixes previously working feature
https://docs.gitlab.com/ee/ci/pipelines/settings.html#merge-request-test-coverage-results

Add xml coverage report
base on that GitLab coverage integration
https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization.html#python-example

Create artifact already eventhough it is not yet deployed
to a web server (#167)
parent c75574d0
No related branches found
No related tags found
1 merge request!175Poetry v1.2, pytest-clarity, runners, coverage, bump deps
Pipeline #17420 passed
...@@ -100,9 +100,19 @@ tests:3.8: ...@@ -100,9 +100,19 @@ tests:3.8:
tests:3.9:cov: tests:3.9:cov:
extends: .tests extends: .tests
coverage: '/(?i)total.*\s+(\d+%)/'
script: script:
- poetry install - poetry install
- poetry run pytest --cov duniterpy --cov-report html:cov_html --cov-report term - poetry run pytest --cov duniterpy --cov-report html:cov_html --cov-report xml --cov-report term
artifacts:
paths:
- cov_html
- coverage.xml
expire_in: 2 days
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
tests:3.10: tests:3.10:
extends: .tests extends: .tests
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment