Skip to content
Snippets Groups Projects
Commit 503f3055 authored by Klaas Kliffen's avatar Klaas Kliffen :satellite:
Browse files

Merge branch 'coverage-report' into 'main'

Code coverage job and integration with gitlab CI/CD

See merge request !8
parents 726f5dc5 de927407
No related branches found
No related tags found
1 merge request!8Code coverage job and integration with gitlab CI/CD
...@@ -3,3 +3,5 @@ dist/* ...@@ -3,3 +3,5 @@ dist/*
*.pyc *.pyc
.coverage .coverage
coverage.xml
htmlcov/*
...@@ -45,6 +45,19 @@ run_pylint: ...@@ -45,6 +45,19 @@ run_pylint:
# script: # script:
# - echo "build fortran/c/cpp extension source code" # - echo "build fortran/c/cpp extension source code"
run_unit_tests_coverage:
stage: test
image: python:3.7
script:
- tox -e coverage
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
paths:
- htmlcov/*
run_unit_tests: run_unit_tests:
stage: test stage: test
image: python:3.${PY_VERSION} image: python:3.${PY_VERSION}
......
...@@ -16,7 +16,12 @@ deps = ...@@ -16,7 +16,12 @@ deps =
-r{toxinidir}/tests/requirements.txt -r{toxinidir}/tests/requirements.txt
commands = commands =
{envpython} --version {envpython} --version
{envpython} -m pytest --cov=map {envpython} -m pytest
[testenv:coverage]
commands =
{envpython} --version
{envpython} -m pytest --cov-report xml --cov-report html --cov=map
# Use generative name and command prefixes to reuse the same virtualenv # Use generative name and command prefixes to reuse the same virtualenv
# for all linting jobs. # for all linting jobs.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment