Commit 45001d49 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

WIP: test: integrate pytest-html into tox and .gitlab-ci.yaml

I've had to patch pytest itself to avoid a bug raised by pytest-html. I've yet
to reach both projects and inspect in details the bug to understand from where
this bug is really coming.
parent 2e480dc5a2fe
Pipeline #10937 failed with stages
in 51 minutes and 55 seconds
......@@ -54,6 +54,9 @@ py3_server:
image: r.intra.logilab.fr/jenkins/jnlp:buster
script:
- tox -e py3-server
artifacts:
paths:
- /builds/cubicweb/cubicweb/server.html
py3_web:
except:
......@@ -65,6 +68,9 @@ py3_web:
- sudo apt update && sudo apt install -y firefox-esr
script:
- tox -e py3-web
artifacts:
paths:
- /builds/cubicweb/cubicweb/web.html
py3_misc:
except:
......@@ -76,6 +82,9 @@ py3_misc:
- sudo apt update && sudo apt install -y firefox-esr
script:
- tox -e py3-misc
artifacts:
paths:
- /builds/cubicweb/cubicweb/misc.html
py3-from-forge-server:
stage: tests
......@@ -83,6 +92,9 @@ py3-from-forge-server:
allow_failure: true
script:
- tox -e py3-from-forge-server
artifacts:
paths:
- /builds/cubicweb/cubicweb/from-forge-server.html
py3-from-forge-web:
stage: tests
......@@ -92,6 +104,9 @@ py3-from-forge-web:
- sudo apt update && sudo apt install -y firefox-esr
script:
- tox -e py3-from-forge-web
artifacts:
paths:
- /builds/cubicweb/cubicweb/from-forge-web.html
py3-from-forge-misc:
stage: tests
......@@ -101,6 +116,9 @@ py3-from-forge-misc:
- sudo apt update && sudo apt install -y firefox-esr
script:
- tox -e py3-from-forge-misc
artifacts:
paths:
- /builds/cubicweb/cubicweb/from-forge-misc.html
trigger-readthedocs:
only:
......
pytest
pytest-subtests
pytest-html
......@@ -16,9 +16,9 @@ deps =
web: -r{toxinidir}/requirements/test-web.txt
commands =
misc: {envpython} -m pip install --upgrade --no-deps --quiet https://github.com/logilab/yapps/tarball/master#egg=yapps
misc: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/test {toxinidir}/cubicweb/dataimport/test {toxinidir}/cubicweb/devtools/test {toxinidir}/cubicweb/entities/test {toxinidir}/cubicweb/ext/test {toxinidir}/cubicweb/hooks/test {toxinidir}/cubicweb/sobjects/test {toxinidir}/cubicweb/wsgi/test {toxinidir}/cubicweb/pyramid/test
server: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/server/test
web: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/web/test
misc: {envpython} -m pytest --html=misc.html {posargs} {toxinidir}/cubicweb/test {toxinidir}/cubicweb/dataimport/test {toxinidir}/cubicweb/devtools/test {toxinidir}/cubicweb/entities/test {toxinidir}/cubicweb/ext/test {toxinidir}/cubicweb/hooks/test {toxinidir}/cubicweb/sobjects/test {toxinidir}/cubicweb/wsgi/test {toxinidir}/cubicweb/pyramid/test
server: {envpython} -m pytest --html=server.html {posargs} {toxinidir}/cubicweb/server/test
web: {envpython} -m pytest --html=web.html {posargs} {toxinidir}/cubicweb/web/test
[testenv:py3-from-forge-misc]
basepython=python3
......@@ -28,7 +28,8 @@ deps =
-r{toxinidir}/requirements/test-misc.txt
commands =
{envpython} -m pip install --upgrade --no-deps --quiet https://github.com/logilab/yapps/tarball/master#egg=yapps
{envpython} -m pytest {posargs} {toxinidir}/cubicweb/test {toxinidir}/cubicweb/dataimport/test {toxinidir}/cubicweb/devtools/test {toxinidir}/cubicweb/entities/test {toxinidir}/cubicweb/ext/test {toxinidir}/cubicweb/hooks/test {toxinidir}/cubicweb/sobjects/test {toxinidir}/cubicweb/wsgi/test {toxinidir}/cubicweb/pyramid/test
{envpython} -m pip install -U git+https://github.com/Psycojoker/pytest
{envpython} -m pytest {posargs} --html=from-forge-misc.html {toxinidir}/cubicweb/test {toxinidir}/cubicweb/dataimport/test {toxinidir}/cubicweb/devtools/test {toxinidir}/cubicweb/entities/test {toxinidir}/cubicweb/ext/test {toxinidir}/cubicweb/hooks/test {toxinidir}/cubicweb/sobjects/test {toxinidir}/cubicweb/wsgi/test {toxinidir}/cubicweb/pyramid/test
[testenv:py3-from-forge-server]
basepython=python3
......@@ -37,7 +38,8 @@ deps =
-r{toxinidir}/requirements/dev.txt
-r{toxinidir}/requirements/test-server.txt
commands =
{envpython} -m pytest {posargs} {toxinidir}/cubicweb/server/test
{envpython} -m pip install -U git+https://github.com/Psycojoker/pytest
{envpython} -m pytest {posargs} --html=from-forge-server.html {toxinidir}/cubicweb/server/test
[testenv:py3-from-forge-web]
basepython=python3
......@@ -46,7 +48,8 @@ deps =
-r{toxinidir}/requirements/dev.txt
-r{toxinidir}/requirements/test-web.txt
commands =
{envpython} -m pytest {posargs} {toxinidir}/cubicweb/web/test
{envpython} -m pip install -U git+https://github.com/Psycojoker/pytest
{envpython} -m pytest --html=from-forge-web.html {posargs} {toxinidir}/cubicweb/web/test
[testenv:flake8]
skip_install = true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment