Skip to content
Snippets Groups Projects

Show unit test reports in Gitlab

Merged Daniel Lyons requested to merge show-unit-test-reports-in-gitlab into 2.8.4-DEVELOPMENT
Compare and
2 files
+ 17
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -7,6 +7,7 @@
- echo building package in $PACKAGE_PATH
- export CAPO_PATH=$PWD
- export CAPO_PROFILE=docker
- export PACKAGE_NAME=$(basename $PACKAGE_PATH)
- WD=$PWD
- cd ${PACKAGE_PATH}
@@ -21,7 +22,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 +49,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}/**/*
Loading