Skip to content

Commit 3ff7725

Browse files
committed
Use relative paths for coverage
1 parent ce06be5 commit 3ff7725

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ check-dist:
4545
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
4646
artifacts:
4747
reports:
48-
junit: .tox/junit.xml
48+
junit: ${CI_PROJECT_DIR}/junit.xml
4949
coverage_report:
5050
coverage_format: cobertura
51-
path: .tox/coverage.xml
51+
path: ${CI_PROJECT_DIR}/coverage.xml
5252

5353
test-tox-python:
5454
extends: .test-tox
5555
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/python:${PYTHON_VERSION}
5656
script:
57-
- tox -e "py${PYTHON_VERSION/./}" -- -v --output-file junit.xml
57+
- tox -e "py${PYTHON_VERSION/./}" -- -v --output-file "${CI_PROJECT_DIR}/junit.xml"
5858
parallel:
5959
matrix:
6060
- PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
@@ -63,4 +63,4 @@ test-tox-pypy:
6363
extends: .test-tox
6464
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/pypy:3
6565
script:
66-
- tox -e pypy3 -- -v --output-file junit.xml
66+
- tox -e pypy3 -- -v --output-file "${CI_PROJECT_DIR}/junit.xml"

tox.ini

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
envlist = py39, py310, py311, py312, py313, py314, pypy3
33

44
[testenv]
5-
changedir = {toxworkdir}
5+
changedir = {env_site_packages_dir}
66
commands =
7-
coverage run --source=sql --omit=*/tests/* -m xmlrunner discover -s sql.tests {posargs}
7+
coverage run --rcfile={toxinidir}/tox.ini --source=sql --omit=*/tests/* -m xmlrunner discover -s sql.tests {posargs}
88
commands_post =
9-
coverage report --omit=README.rst
10-
coverage xml --omit=README.rst
9+
coverage report --rcfile={toxinidir}/tox.ini --omit=README.rst
10+
coverage xml --rcfile={toxinidir}/tox.ini --omit=README.rst -o {package_root}/coverage.xml
1111
deps =
1212
coverage
1313
unittest-xml-reporting
1414
passenv = *
15+
16+
[coverage:run]
17+
relative_files = true

0 commit comments

Comments
 (0)