Skip to content

Commit bb9434b

Browse files
committed
Make GitLab collect test and coverage reports
1 parent 6ce8eb7 commit bb9434b

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.gitlab-ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,10 @@ pytest:
3434
- '3.10'
3535
- '3.11'
3636
- '3.12'
37+
coverage: /^TOTAL.+?(\d+\%)$/
38+
artifacts:
39+
reports:
40+
coverage_report:
41+
coverage_format: cobertura
42+
path: coverage.xml
43+
junit: junit.xml

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ show_missing = true
2121
source = ["example"]
2222

2323
[tool.pytest.ini_options]
24-
addopts = "--color=yes --doctest-modules --verbose"
24+
addopts = "--color=yes --doctest-modules --junitxml=junit.xml --verbose"
2525

2626
[tool.ruff]
2727
extend-exclude = []

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ deps =
88
pytest
99
commands =
1010
coverage run -m pytest {posargs}
11+
coverage xml
1112
coverage report
1213

1314
[testenv:format]

0 commit comments

Comments
 (0)