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

Merge branch 'feature/new-codeception-tests_' into 'master'

Feature/new codeception tests

See merge request wpdesk/gitlab-ci!151
parents 3bacd178 b0bff088
No related branches found
No related tags found
No related merge requests found
......@@ -13,3 +13,4 @@ update wpdesk plugins database:
when: always
dependencies:
- deploy to repository
......@@ -2,7 +2,7 @@
tags:
- codeception
image:
name: wpdesknet/codeception:latest
name: wpdesknet/codeception:9
entrypoint: [""]
dependencies:
- prepare npm assets
......@@ -43,18 +43,20 @@
- export WOOTESTS_IP=$(awk '/^[[:space:]]*($|#)/{next} /wootests/{print $1; exit}' /etc/hosts)
- cd ${CI_PROJECT_DIR}
- mkdir -p /project
- cp -r ${CI_PROJECT_DIR}/. /project
- cd /project
- COMPOSER_MEMORY_LIMIT=-1 composer install --no-progress --prefer-dist --no-dev
- if [ -f ./tests/codeception/bootstrap.sh ]; then cp -r ${CI_PROJECT_DIR}/. /project; fi
- if [ -f ./tests/codeception/bootstrap.sh ]; then cd /project; fi
- if [ -f ./tests/codeception/bootstrap.sh ]; then COMPOSER_MEMORY_LIMIT=-1 composer install --no-progress --prefer-dist --no-dev; fi
- cd ${CI_PROJECT_DIR}
- mkdir -p ${APACHE_DOCUMENT_ROOT}
- cd ${APACHE_DOCUMENT_ROOT}
- wp core download ${WORDPRESS_CLI_PARAMETERS} --allow-root
- wp config create --dbhost=${MYSQL_IP} --dbname=wptest --dbuser=mysql --dbpass=mysql --allow-root
- wp config set WP_DEBUG true --raw --type=constant --allow-root
- chmod a+x ${CI_PROJECT_DIR}/tests/codeception/bootstrap.sh
- if [ -f ./tests/codeception/bootstrap.sh ]; then wp core download ${WORDPRESS_CLI_PARAMETERS} --allow-root; fi;
- if [ -f ./tests/codeception/bootstrap.sh ]; then wp config create --dbhost=${MYSQL_IP} --dbname=wptest --dbuser=mysql --dbpass=mysql --allow-root; fi;
- if [ -f ./tests/codeception/bootstrap.sh ]; then wp config set WP_DEBUG true --raw --type=constant --allow-root; fi;
- cd ${CI_PROJECT_DIR}
- . ./tests/codeception/bootstrap.sh
- if [ -f ./tests/codeception/bootstrap.sh ]; then chmod a+x ./tests/codeception/bootstrap.sh; fi;
- if [ -f ./tests/codeception/bootstrap.sh ]; then . ./tests/codeception/bootstrap.sh; fi;
- if [ ! -f ./tests/codeception/bootstrap.sh ]; then composer prepare-wordpress-for-codeception; fi;
- if [ ! -f ./tests/codeception/bootstrap.sh ]; then composer prepare-local-codeception-tests; fi;
- mkdir -p ${CI_PROJECT_DIR}/tests/codeception/tests/_output
- mkdir -p ${CI_PROJECT_DIR}/tests/codeception/tests/acceptance
- mkdir -p ${CI_PROJECT_DIR}/tests/codeception/tests/functional
......@@ -69,17 +71,6 @@
after_script:
- rm -r ${APACHE_DOCUMENT_ROOT}
.template: &job-codeception-test-latest-woocommerce
<<: *job-codeception-test
variables:
WP_CLI_CACHE_DIR: /cache/wp-cli
APACHE_DOCUMENT_ROOT: ${CI_PROJECT_DIR}/tests/wordpress
CI_DEBUG_SERVICES: trace
SCREEN_WIDTH: 1200
SCREEN_HEIGHT: 1600
WOOCOMMERCE_VERSION: github
allow_failure: true
codeception test:
<<: *job-codeception-test
only:
......@@ -88,14 +79,6 @@ codeception test:
- devel
- tags
codeception test latest woocommerce:
<<: *job-codeception-test-latest-woocommerce
only:
refs:
- master
- devel
- tags
codeception test manual:
<<: *job-codeception-test
when: manual
......@@ -108,18 +91,6 @@ codeception test manual:
variables:
- $DISABLE_CODECEPTION
codeception test latest woocommerce manual:
<<: *job-codeception-test-latest-woocommerce
when: manual
allow_failure: true
except:
refs:
- master
- devel
- tags
variables:
- $DISABLE_CODECEPTION
codeception test recorded manual:
<<: *job-codeception-test
when: manual
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment