diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d89b059af59d74dc234e49a40168d17ffa4f36b4..f850435f1e1c1a1f5b597c634ae02fab2f305d0c 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,6 @@ build-from-ubuntu: - pip3 install -r requirements-dev.txt - py.test test/test_install/test_make_ubuntu.py -xv - build-from-barrnap: image: registry-gitlab.pasteur.fr/aperrin/pipeline_annotation/install-ubuntu-barrnaponly stage: build @@ -32,7 +31,6 @@ build-from-barrnap: - pip3 install -r requirements-dev.txt - py.test test/test_install/test_make_barrnap.py -xv - build-from-prokka-quicktree: image: registry-gitlab.pasteur.fr/aperrin/pipeline_annotation/install-ubuntu-annote-quicktree stage: build @@ -43,7 +41,6 @@ build-from-prokka-quicktree: - pip3 install -r requirements-dev.txt - py.test test/test_install/test_make_prokka-quicktree.py -xv - build-from-prodigal: image: registry-gitlab.pasteur.fr/aperrin/pipeline_annotation/install-prodigal stage: build @@ -54,7 +51,6 @@ build-from-prodigal: - pip3 install -r requirements-dev.txt - py.test test/test_install/test_make_prodigal.py -xv - build-from-test-image: stage: build only: @@ -64,6 +60,7 @@ build-from-test-image: - pip3 install -r requirements-dev.txt - py.test test/test_install/test_make_all-installed.py -xv + unit-test-ubuntu: stage: test except: @@ -87,7 +84,7 @@ unit-test-ubuntu: - py.test test/test_unit/test_annotate/test_format* -v -x - py.test test/test_unit/test_pangenome -vx - py.test test/test_unit/test_corepers -vx - # - py.test test/test_unit/test_align -vx + - py.test test/test_unit/test_align -vx - py.test test/test_unit/test_tree -xv - coverage report - mv .coverage .coverage.unit @@ -108,17 +105,16 @@ func-test-ubuntu: - ./make script: - pwd - # - py.test test/test_functional/test_pangenome.py -vx - # - py.test test/test_functional/test_pangenome-parser.py -vx - # - py.test test/test_functional/test_corepers* -vx - # - py.test test/test_functional/test_align-parser.py -vx - # - py.test test/test_functional/test_align.py -vx - # - py.test test/test_functional/test_tree* -vx - # - py.test test/test_functional/test_annote-parser.py -vx - # - py.test test/test_functional/test_annote.py -xv - # - py.test test/test_functional/test_all* -vx - # - py.test test/test_functional/test_prepare* -vx - - py.test test/test_unit/test_align -vx + - py.test test/test_functional/test_pangenome.py -vx + - py.test test/test_functional/test_pangenome-parser.py -vx + - py.test test/test_functional/test_corepers* -vx + - py.test test/test_functional/test_align-parser.py -vx + - py.test test/test_functional/test_align.py -vx + - py.test test/test_functional/test_tree* -vx + - py.test test/test_functional/test_annote-parser.py -vx + - py.test test/test_functional/test_annote.py -xv + - py.test test/test_functional/test_all* -vx + - py.test test/test_functional/test_prepare* -vx - coverage report - mv .coverage .coverage.functional artifacts: @@ -127,6 +123,7 @@ func-test-ubuntu: - htmlcov/index.html expire_in: 1 hour + coverage: stage: coverage except: @@ -142,8 +139,8 @@ coverage: script: - pwd - coverage combine .coverage.unit .coverage.functional - - coverage report -i - - coverage html -i + - coverage report + - coverage html # test coverage parsing: \d+\%\s*$ # or pytest-cov (Python): ^TOTAL.+?(\d+\%)$ artifacts: diff --git a/setup.cfg b/setup.cfg index a8122f5dc2b840f9e53056e2e298efd273f42e4e..a1aa77db6e8c7f5effdc73402b434c382441b0f4 100755 --- a/setup.cfg +++ b/setup.cfg @@ -20,9 +20,12 @@ exclude_lines = pragma: no cover [coverage:run] +# use relative paths in .coverage generated file. +# Useful when .coverage is used to generate a report from a different directory than the one it was generated +# (like, for gitlab-ci tests). +# see https://github.com/nedbat/coveragepy/issues/597 relative_files = True - [build_sphinx] source-dir = doc_sources/ build-dir = doc/