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

Feature/new codeception tests

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