Skip to content
Snippets Groups Projects
Commit 673876e9 authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

Feature/codeception integration tests

parent 9e638315
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,9 @@ include: ...@@ -33,6 +33,9 @@ include:
- project: 'wpdesk/gitlab-ci' - project: 'wpdesk/gitlab-ci'
ref: 'master' ref: 'master'
file: '/includes/metrics.yml' file: '/includes/metrics.yml'
- project: 'wpdesk/gitlab-ci'
ref: 'master'
file: '/includes/tests/codeception-integration.yml'
- project: 'wpdesk/gitlab-ci' - project: 'wpdesk/gitlab-ci'
ref: 'master' ref: 'master'
file: '/includes/tests/codeception.yml' file: '/includes/tests/codeception.yml'
......
integration codeception tests:
tags:
- codeception
- $TESTS_TAG
image:
name: wpdesknet/codeception:11
entrypoint: [""]
variables:
WP_CLI_CACHE_DIR: /cache/wp-cli
APACHE_DOCUMENT_ROOT: ${CI_PROJECT_DIR}/tests/wordpress
CI_DEBUG_SERVICES: trace
services:
- name: mysql:5.6
alias: mysqltests
command: [--max-allowed-packet=67108864]
artifacts:
when: always
expire_in: 1 month
name: "acceptance logs"
paths:
- tests/codeception/tests/_output
reports:
junit: tests/codeception/tests/_output/report.xml
stage: tests
rules:
- exists:
- tests/codeception/tests/integration.suite.yml
allow_failure: false
interruptible: true
before_script:
- export DEPENDENT_PLUGINS_DIR=${CI_PROJECT_DIR}/tests/dependent_plugins
- export MYSQL_IP=$(awk '/^[[:space:]]*($|#)/{next} /mysqltests/{print $1; exit}' /etc/hosts)
- export WOOTESTS_IP=127.0.0.1
- export TEST_SITE_WP_URL="http://${WOOTESTS_IP}"
- cd ${CI_PROJECT_DIR}
- mkdir -p /project
- cd ${CI_PROJECT_DIR}
- mkdir -p ${APACHE_DOCUMENT_ROOT}
- cd ${APACHE_DOCUMENT_ROOT}
- cd ${CI_PROJECT_DIR}
- composer prepare-wordpress-for-codeception
- composer prepare-local-codeception-tests
- chmod -R a+w ${APACHE_DOCUMENT_ROOT}/wp-content/uploads
- touch ${APACHE_DOCUMENT_ROOT}/wp-content/debug.log
- chmod a+w ${APACHE_DOCUMENT_ROOT}/wp-content/debug.log
- echo "End before"
- cd ${CI_PROJECT_DIR}
script:
- vendor/bin/codecept run integration --steps --xml --html -f --verbose
after_script:
- cp ${APACHE_DOCUMENT_ROOT}/wp-content/debug.log tests/codeception/tests/_output/debug.log || true
- cp ${APACHE_DOCUMENT_ROOT}/wp-content/uploads/wpdesk-logs/wpdesk_debug.log tests/codeception/tests/_output/wpdesk_debug.log || true
- rm -r ${APACHE_DOCUMENT_ROOT}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment