details:   https://code.tryton.org/hatch-tryton/commit/5d04ccc1441b
branch:    default
user:      Cédric Krier <[email protected]>
date:      Sat Mar 28 00:09:29 2026 +0100
description:
        Use relative paths for coverage
diffstat:

 .gitlab-ci.yml |   8 ++++----
 tox.ini        |  11 +++++++----
 2 files changed, 11 insertions(+), 8 deletions(-)

diffs (53 lines):

diff -r 69ad1cee6adc -r 5d04ccc1441b .gitlab-ci.yml
--- a/.gitlab-ci.yml    Mon Mar 23 08:50:50 2026 +0100
+++ b/.gitlab-ci.yml    Sat Mar 28 00:09:29 2026 +0100
@@ -45,16 +45,16 @@
   coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
   artifacts:
     reports:
-      junit: .tox/junit.xml
+      junit: ${CI_PROJECT_DIR}/junit.xml
       coverage_report:
         coverage_format: cobertura
-        path: .tox/coverage.xml
+        path: ${CI_PROJECT_DIR}/coverage.xml
 
 test-tox-python:
   extends: .test-tox
   image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/python:${PYTHON_VERSION}
   script:
-    - tox -e "py${PYTHON_VERSION/./}" -- -v --output-file junit.xml
+    - tox -e "py${PYTHON_VERSION/./}" -- -v --output-file 
"${CI_PROJECT_DIR}/junit.xml"
   parallel:
     matrix:
       - PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
@@ -63,4 +63,4 @@
   extends: .test-tox
   image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/pypy:3
   script:
-    - tox -e pypy3 -- -v --output-file junit.xml
+    - tox -e pypy3 -- -v --output-file "${CI_PROJECT_DIR}/junit.xml"
diff -r 69ad1cee6adc -r 5d04ccc1441b tox.ini
--- a/tox.ini   Mon Mar 23 08:50:50 2026 +0100
+++ b/tox.ini   Sat Mar 28 00:09:29 2026 +0100
@@ -2,13 +2,16 @@
 envlist = py39, py310, py311, py312, py313, py314, pypy3
 
 [testenv]
-changedir = {toxworkdir}
+changedir = {env_site_packages_dir}
 commands =
-    coverage run --source=hatch_tryton --omit=*/tests/* -m xmlrunner discover 
-s hatch_tryton.tests {posargs}
+    coverage run --rcfile={toxinidir}/tox.ini --source=hatch_tryton 
--omit=*/tests/* -m xmlrunner discover -s hatch_tryton.tests {posargs}
 commands_post =
-    coverage report
-    coverage xml
+    coverage report --rcfile={toxinidir}/tox.ini
+    coverage xml --rcfile={toxinidir}/tox.ini -o {package_root}/coverage.xml
 deps =
     coverage
     unittest-xml-reporting
 passenv = *
+
+[coverage:run]
+relative_files = true

Reply via email to