Skip to content
Snippets Groups Projects
Commit 54c9ff2e authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

Merge branch 'show-unit-test-reports-in-gitlab' into '2.8.4-DEVELOPMENT'

Show unit test reports in Gitlab

See merge request !1649
parents a96af2a1 caf30655
No related branches found
No related tags found
2 merge requests!1706merge 2.8.4 to main,!1649Show unit test reports in Gitlab
Pipeline #15731 canceled
......@@ -62,6 +62,7 @@ build carta envoy:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/carta_envoy"
PACKAGE_NAME: "carta_envoy"
extends: .build-package
build casa envoy:
......@@ -69,6 +70,7 @@ build casa envoy:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/casa_envoy"
PACKAGE_NAME: "casa_envoy"
extends: .build-package
build core sampler:
......@@ -76,6 +78,7 @@ build core sampler:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/utilities/core_sampler"
PACKAGE_NAME: "core_sampler"
extends: .build-package
build conveyor:
......@@ -83,6 +86,7 @@ build conveyor:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/conveyor"
PACKAGE_NAME: "conveyor"
extends: .build-package
build data annotator:
......@@ -90,6 +94,7 @@ build data annotator:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/data_annotator"
PACKAGE_NAME: "data_annotator"
extends: .build-package
build deliver:
......@@ -97,6 +102,7 @@ build deliver:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/deliver"
PACKAGE_NAME: "deliver"
extends: .build-package
build ingest envoy:
......@@ -104,6 +110,7 @@ build ingest envoy:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/ingest_envoy"
PACKAGE_NAME: "ingest_envoy"
extends: .build-package
build mediator:
......@@ -111,6 +118,7 @@ build mediator:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/mediator"
PACKAGE_NAME: "mediator"
extends: .build-package
build null:
......@@ -118,6 +126,7 @@ build null:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/null"
PACKAGE_NAME: "null"
extends: .build-package
build productfetcher:
......@@ -125,6 +134,7 @@ build productfetcher:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/productfetcher"
PACKAGE_NAME: "productfetcher"
extends: .build-package
build update stage:
......@@ -132,6 +142,7 @@ build update stage:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/update_stage"
PACKAGE_NAME: "update_stage"
extends: .build-package
build vela:
......@@ -139,6 +150,7 @@ build vela:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/vela"
PACKAGE_NAME: "vela"
extends: .build-package
build wf inspector:
......@@ -146,6 +158,7 @@ build wf inspector:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/wf_inspector"
PACKAGE_NAME: "wf_inspector"
extends: .build-package
build ws annihilator:
......@@ -153,6 +166,7 @@ build ws annihilator:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/ws_annihilator"
PACKAGE_NAME: "ws_annihilator"
extends: .build-package
build ws metrics:
......@@ -160,6 +174,7 @@ build ws metrics:
stage: build-packages
variables:
PACKAGE_PATH: "apps/cli/executables/pexable/ws_metrics"
PACKAGE_NAME: "ws_metrics"
extends: .build-package
......
......@@ -21,7 +21,8 @@
# Install the packages for testing
- poetry install --with test
- $(poetry env info -p)/bin/pytest .
- $(poetry env info -p)/bin/pytest --junitxml=tests.xml .
- mv ./tests.xml ${CI_PROJECT_DIR}/tests.${PACKAGE_NAME}.${CI_COMMIT_SHORT_SHA}.xml
# once tests pass, look to see if there is a conflicting version in pypi registry
- PACKAGE_NAME=$(basename $PWD)
......@@ -47,6 +48,12 @@
# Return to the parent directory
- cd $WD
artifacts:
paths:
- ${CI_PROJECT_DIR}/tests.${PACKAGE_NAME}.${CI_COMMIT_SHORT_SHA}.xml
reports:
junit:
- ${CI_PROJECT_DIR}/tests.${PACKAGE_NAME}.${CI_COMMIT_SHORT_SHA}.xml
rules:
- changes:
- ${PACKAGE_PATH}/**/*
......@@ -5,11 +5,16 @@
- cd ${PATH_PREFIX}${SERVICE_NAME}
# use the poetry virtual environment and packages
- poetry install --with test
- $(poetry env info -p)/bin/pytest --cov=${SERVICE_NAME} --cov-report=
- $(poetry env info -p)/bin/pytest --junitxml=tests.xml --cov=${SERVICE_NAME} --cov-report=
- mv ./.coverage ${CI_PROJECT_DIR}/.coverage.${SERVICE_NAME}.${CI_COMMIT_SHORT_SHA}
- mv ./tests.xml ${CI_PROJECT_DIR}/tests.${SERVICE_NAME}.${CI_COMMIT_SHORT_SHA}.xml
artifacts:
paths:
- .coverage.${SERVICE_NAME}.${CI_COMMIT_SHORT_SHA}
- ${CI_PROJECT_DIR}/tests.${SERVICE_NAME}.${CI_COMMIT_SHORT_SHA}.xml
reports:
junit:
- ${CI_PROJECT_DIR}/tests.${SERVICE_NAME}.${CI_COMMIT_SHORT_SHA}.xml
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /(^[0-9](\.[0-9])*)-DEVELOPMENT/'
variables:
......
......@@ -31,6 +31,12 @@ prometheus_exporter = prometheus_client.make_wsgi_app()
@wsgiapp
def metrics(environ, start_response):
"""
Export metrics
:param environ:
:param start_response:
:return:
"""
return prometheus_exporter(environ, start_response)
......
......@@ -26,6 +26,7 @@ def includeme(config: Configurator):
:param config: Pyramid server config object
"""
default_routes(config)
notification_routes(config)
notification_sending_routes(config)
......
......@@ -53,6 +53,12 @@ prometheus_exporter = prometheus_client.make_wsgi_app()
@wsgiapp
def metrics(environ, start_response):
"""
Export metrics
:param environ:
:param start_response:
:return:
"""
return prometheus_exporter(environ, start_response)
......
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