Skip to content
Snippets Groups Projects
Select Git revision
  • 9f68dc1fb657598bba0059612f973db720bc0d41
  • master default protected
  • feat/message-handling
  • feat/request-id
  • 1.13.2
  • 1.13.1
  • 1.13.0
  • 1.12.1
  • 1.12.0
  • 1.11.0
  • 1.11.0-beta2
  • 1.11.0-beta1
  • 1.10.2
  • 1.10.1
  • 1.10.0
  • 1.9.0
  • 1.8.0
  • 1.7.4
  • 1.7.3
  • 1.7.2
  • 1.7.1
  • 1.7.0
  • 1.6.2
  • 1.6.2-beta2
24 results

phpunit-integration.xml

Blame
  • codeception.yml 5.27 KiB
    .template: &job-codeception-test
      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
        SCREEN_WIDTH: 1200
        SCREEN_HEIGHT: 1200
      services:
        - name: mysql:5.6
          alias: mysqltests
          command: [--max-allowed-packet=67108864]
        - name: wpdesknet/wordpress:52
          alias: wootests
        - name: selenium/standalone-chrome:latest
          alias: chrome
      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
      except:
        variables:
          - $DISABLE_CODECEPTION
      allow_failure: false
      interruptible: true
      before_script:
        - export DEPENDENT_PLUGINS_DIR=${CI_PROJECT_DIR}/tests/dependent_plugins
        - mkdir -p /cache/wp-cli
        - export MYSQL_IP=$(awk '/^[[:space:]]*($|#)/{next} /mysqltests/{print $1; exit}' /etc/hosts)
        - export WOOTESTS_IP=$(awk '/^[[:space:]]*($|#)/{next} /wootests/{print $1; exit}' /etc/hosts)
        - export TEST_SITE_WP_URL="http://${WOOTESTS_IP}"
        - cd ${CI_PROJECT_DIR}
        - mkdir -p /project
        - if [ -f ${CI_PROJECT_DIR}/tests/codeception/bootstrap.sh ]; then cp -r ${CI_PROJECT_DIR}/. /project; fi
        - if [ -f ${CI_PROJECT_DIR}/tests/codeception/bootstrap.sh ]; then cd /project; fi
        - if [ -f ${CI_PROJECT_DIR}/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}
        - if [ -f ${CI_PROJECT_DIR}/tests/codeception/bootstrap.sh ]; then wp core download ${WORDPRESS_CLI_PARAMETERS} --allow-root; fi;
        - if [ -f ${CI_PROJECT_DIR}/tests/codeception/bootstrap.sh ]; then wp config create --dbhost=${MYSQL_IP} --dbname=wptest --dbuser=mysql --dbpass=mysql --allow-root; fi;
        - if [ -f ${CI_PROJECT_DIR}/tests/codeception/bootstrap.sh ]; then wp config set WP_DEBUG true --raw --type=constant --allow-root; fi;
        - cd ${CI_PROJECT_DIR}
        - if [ -f ${CI_PROJECT_DIR}/tests/codeception/bootstrap.sh ]; then chmod a+x ./tests/codeception/bootstrap.sh; fi;
        - if [ -f ${CI_PROJECT_DIR}/tests/codeception/bootstrap.sh ]; then . ./tests/codeception/bootstrap.sh; fi;
        - if [ -f ${CI_PROJECT_DIR}/tests/codeception/wpdesk.yml ]; then composer prepare-wordpress-for-codeception; fi;
        - if [ -f ${CI_PROJECT_DIR}/tests/codeception/wpdesk.yml ]; 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
        - mkdir -p ${CI_PROJECT_DIR}/tests/codeception/tests/unit
        - 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 --steps --xml --html -f --verbose
      after_script:
        - cp ${APACHE_DOCUMENT_ROOT}/wp-content/debug.log tests/codeception/tests/_output/debug.log || true