Skip to content
Snippets Groups Projects
Commit b96dc0d5 authored by Sergio Gonzalez Diaz's avatar Sergio Gonzalez Diaz
Browse files

Merge branch 'feat/code-coverage' into 'develop'

Feat/code coverage

See merge request teraflow-h2020/controller!66
parents 0895f598 72a31cb2
No related branches found
No related tags found
1 merge request!54Release 2.0.0
...@@ -43,7 +43,8 @@ unit test monitoring: ...@@ -43,7 +43,8 @@ unit test monitoring:
- sleep 30 - sleep 30
- docker ps -a - docker ps -a
- docker logs $IMAGE_NAME - docker logs $IMAGE_NAME
- docker exec -i $IMAGE_NAME bash -c "pytest --junitxml=/opt/results/report.xml" - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/opt/results/${IMAGE_NAME}_report.xml; coverage xml -o /opt/results/${IMAGE_NAME}_coverage.xml; coverage report --include='${IMAGE_NAME}/*' --show-missing"
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
after_script: after_script:
- docker rm -f $IMAGE_NAME - docker rm -f $IMAGE_NAME
- docker rm -f influxdb - docker rm -f influxdb
...@@ -61,8 +62,9 @@ unit test monitoring: ...@@ -61,8 +62,9 @@ unit test monitoring:
artifacts: artifacts:
when: always when: always
reports: reports:
junit: src/$IMAGE_NAME/tests/report.xml junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml
cobertura: src/$IMAGE_NAME/tests/${IMAGE_NAME}_coverage.xml
# Deployment of the service in Kubernetes Cluster # Deployment of the service in Kubernetes Cluster
deploy monitoring: deploy monitoring:
variables: variables:
......
...@@ -9,4 +9,5 @@ prometheus-client ...@@ -9,4 +9,5 @@ prometheus-client
pytest pytest
pytest-benchmark pytest-benchmark
influxdb influxdb
redis redis
\ No newline at end of file coverage
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment