Cédric Krier pushed to branch branch/default at Tryton / python-sql


Commits:
726ea642 by Cédric Krier at 2023-01-07T22:50:35+01:00
Add unit test reports
- - - - -
be44ed65 by Cédric Krier at 2023-01-08T04:06:19+01:00
Add coverage reports
- - - - -


2 changed files:

- .gitlab-ci.yml
- tox.ini


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -49,8 +49,15 @@
       - .cache/pip
   before_script:
     - pip install tox
+  coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
+  artifacts:
+    reports:
+      junit: junit.xml
+      coverage_report:
+        coverage_format: cobertura
+        path: coverage.xml
 
 test-tox-python:
   extends: .test-tox
   image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/python:${PYTHON_VERSION}
   script:
@@ -52,9 +59,9 @@
 
 test-tox-python:
   extends: .test-tox
   image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/python:${PYTHON_VERSION}
   script:
-    - tox -e "py${PYTHON_VERSION/./}"
+    - tox -e "py${PYTHON_VERSION/./}" -vv -- -v --output-file junit.xml
   parallel:
     matrix:
       - PYTHON_VERSION: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
@@ -63,4 +70,4 @@
   extends: .test-tox
   image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/pypy:3
   script:
-    - tox -e pypy3
+    - tox -e pypy3 -vv -- -v --output-file junit.xml


=====================================
tox.ini
=====================================
@@ -7,4 +7,5 @@
 envlist = py35, py36, py37, py38, py39, py310, pypy3
 
 [testenv]
+usedevelop = true
 commands =
@@ -10,5 +11,7 @@
 commands =
-    coverage run -m unittest discover -s sql.tests
-    coverage report --include=./sql/* --omit=*/tests/*
+    coverage run --omit=*/tests/* -m xmlrunner discover -s sql.tests {posargs}
+commands_post =
+    coverage report --omit=README
+    coverage xml --omit=README
 deps =
     coverage
@@ -13,3 +16,4 @@
 deps =
     coverage
+    unittest-xml-reporting
 passenv = *



View it on Heptapod: 
https://foss.heptapod.net/tryton/python-sql/-/compare/5df8c7a1ae6d862df6d527d6df470f1e2f169d66...be44ed65ad5a99326e466470a2c0f492b54ae07c

-- 
View it on Heptapod: 
https://foss.heptapod.net/tryton/python-sql/-/compare/5df8c7a1ae6d862df6d527d6df470f1e2f169d66...be44ed65ad5a99326e466470a2c0f492b54ae07c
You're receiving this email because of your account on foss.heptapod.net.


Reply via email to