Commit 2e08e2e7 authored by Patrik Dufresne's avatar Patrik Dufresne

Compile each tox environment in parallel.

Configure gitlab-ci to compile all the tox environments in separate
environment. Also add test coverage and publish it on gitlab pages.
parent 430ea168
Pipeline #187 passed with stages
in 35 minutes and 4 seconds
......@@ -40,3 +40,4 @@ nosetests*.xml
/sonar-project.properties
.tox
.pydevproject
/htmlcov/
......@@ -3,29 +3,98 @@ image: ikus060/docker-debian-py2-py3:stretch
stages:
- test
- publish
- pages
# Upgrade python and install dependencies to avoid compiling from sources.
before_script:
- apt-get update && apt-get -qq install python-pysqlite2 libldap2-dev libsasl2-dev rdiff-backup node-less
- pip install pip setuptools --upgrade
# TODO Split this by python version and OS.
test_py27:
.tox: &tox
stage: test
script:
- pip install tox nose coverage --upgrade
- python setup.py build
- export TOXENV=`tox --listenvs | grep "^py27" | tr '\n' ','`
- tox --sitepackages
- tox -e $CI_JOB_NAME --sitepackages
artifacts:
paths:
- .coverage.$CI_JOB_NAME
expire_in: 1 day
py27-cherrypy35:
<<: *tox
test_py3:
stage: test
script:
- pip install tox nose coverage --upgrade
- python setup.py build
- export TOXENV=`tox --listenvs | grep "^py3" | tr '\n' ','`
- tox --sitepackages
py27-cherrypy4:
<<: *tox
py27-cherrypy5:
<<: *tox
py27-cherrypy6:
<<: *tox
py27-cherrypy7:
<<: *tox
py27-cherrypy8:
<<: *tox
py27-cherrypy9:
<<: *tox
py27-cherrypy10:
<<: *tox
py27-cherrypy11:
<<: *tox
py27-cherrypy12:
<<: *tox
py27-cherrypy13:
<<: *tox
py27-cherrypy14:
<<: *tox
py3-cherrypy35:
<<: *tox
py3-cherrypy4:
<<: *tox
py3-cherrypy5:
<<: *tox
py3-cherrypy6:
<<: *tox
py3-cherrypy7:
<<: *tox
py3-cherrypy8:
<<: *tox
py3-cherrypy9:
<<: *tox
py3-cherrypy10:
<<: *tox
py3-cherrypy11:
<<: *tox
py3-cherrypy12:
<<: *tox
py3-cherrypy13:
<<: *tox
py3-cherrypy14:
<<: *tox
py27-cherrypy32:
<<: *tox
# TODO Publish coverage repport
# TODO Publish testcases repport
......@@ -51,3 +120,23 @@ github_push:
- git push --force https://${GITHUB_USR}:${GITHUB_PWD}@github.com/ikus060/rdiffweb.git refs/remotes/origin/${CI_COMMIT_REF_NAME}:refs/heads/${CI_COMMIT_REF_NAME}
- git push https://${GITHUB_USR}:${GITHUB_PWD}@github.com/ikus060/rdiffweb.git --tags
coverage:
stage: publish
script:
- coverage combine .coverage.*
- coverage html
coverage: '/TOTAL.*(\d+%)/'
artifacts:
paths:
- htmlcov/
pages:
stage: pages
dependencies:
- coverage
script:
- mv htmlcov/ public/
artifacts:
paths:
- public
expire_in: 15 days
......@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
[tox]
envlist = py{27,3}-cherrypy{35,4,5,6,7,8,9,10,11},py27-cherrypy32
envlist = py{27,3}-cherrypy{35,4,5,6,7,8,9,10,11,12,13,14},py27-cherrypy32
[testenv]
deps=
......@@ -34,7 +34,9 @@ deps=
cherrypy12: cherrypy>=12.0.0,<13.0.0
cherrypy13: cherrypy>=13.0.0,<14.0.0
cherrypy14: cherrypy>=14.0.0,<15.0.0
commands=python setup.py nosetests --xunit-file=nosetests-{envname}.xml --xunit-testsuite-name={envname} --cover-xml-file=coverage-{envname}.xml
setenv =
COVERAGE_FILE=.coverage.{envname}
commands=python setup.py nosetests --xunit-file=nosetests-{envname}.xml --xunit-testsuite-name={envname}
[travis:env]
CHERRYPY =
......
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