Skip to content
Snippets Groups Projects
Commit 4b46be35 authored by jurgenhaas's avatar jurgenhaas
Browse files

#45 Change test log strategy

parent 8bfb6cfa
No related branches found
No related tags found
No related merge requests found
......@@ -320,6 +320,10 @@ Debug:
- mkdir -p files/default/files/languages
- mkdir -p files/default/files/translations
- chmod -R ugo+w files/default/files/
# Prepare log directory for tests.
- dc exec -u root php mkdir -p /tmp/testlogs
- dc exec -u root php rm -rf /tmp/testlogs/*
- dc exec -u root php chmod oug+w /tmp/testlogs
artifacts:
name: build
when: always
......
......@@ -5,6 +5,8 @@
image: registry.lakedrops.com/docker/gitlab-drupal-ci/php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
variables:
GIT_STRATEGY: none
after_script:
- dc cp php:/tmp/testlogs/* .
needs: ['Build Site']
dependencies:
- 'Build Site'
......@@ -16,6 +18,7 @@
- DIR=$(dc exec -u root php pwd)
- if [[ "${THEME_BUILD}" == "yes" && -d ${THEME_CSS_PATH} ]]; then dc cp ${THEME_CSS_PATH} php:${DIR}/${THEME_CSS_PATH}; fi
after_script:
- dc cp php:/tmp/testlogs/* .
- if [[ "${THEME_BUILD}" == "yes" && -d ${THEME_CSS_PATH} ]]; then dc exec -u root php rm -rf ${THEME_CSS_PATH}; fi
dependencies:
- 'Build Site'
......@@ -24,10 +27,7 @@
Test Code Style:
<<: *test_lakedrops_default
script:
- if [[ -f phpcs.xml ]]; then rm phpcs.xml; fi
- ahoy test phpcs -- --report=xml --report-file=/tmp/phpcs.xml
after_script:
- docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/phpcs.xml phpcs.xml
- ahoy test phpcs -- --report=xml --report-file=/tmp/testlogs/phpcs.xml
artifacts:
name: phpcs
when: always
......@@ -39,12 +39,7 @@ Test Code Style:
Test PHPUnit:
<<: *test_lakedrops_default
script:
- if [[ -f junit.xml ]]; then rm junit.xml; fi
- if [[ -f testdox.html ]]; then rm testdox.html; fi
- ahoy test phpunit -- --log-junit /tmp/junit.xml --testdox-html /tmp/testdox.html
after_script:
- docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/junit.xml junit.xml
- docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/testdox.html testdox.html
- ahoy test phpunit -- --log-junit /tmp/testlogs/junit.xml --testdox-html /tmp/testlogs/testdox.html
artifacts:
name: phpunit
when: always
......@@ -73,16 +68,12 @@ Test Behat:
- job: Update DB
optional: true
script:
- if [[ -d tests/behat/log ]]; then rm -rf tests/behat/log; fi
- mkdir -p tests/behat/log
- chmod oug+w tests/behat/log
- ahoy behat update
- ahoy behat exec -- --format junit --out tests/behat/log
- ahoy behat exec -- --format junit --out /tmp/testlogs/default.xml
artifacts:
name: behat
when: always
paths:
- tests/behat/log
- default.xml
rules:
- if: '$DISABLE_CI_TEST_BEHAT != "1"'
......
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