Select Git revision
-
Marcin Kolanko authoredMarcin Kolanko authored
gitlab-ci-1.2.yml 14.59 KiB
variables:
WPDESK_CI_VERSION: "1.2"
MYSQL_ROOT_PASSWORD: "mysql"
MYSQL_DATABASE: "wptest"
MYSQL_USER: "mysql"
MYSQL_PASSWORD: "mysql"
MYSQL_INNODB_LOG_BUFFER_SIZE: "32M"
PHP_ERROR_REPORTING: "E_ALL"
COMPOSER_ALLOW_SUPERUSER: "1"
GIT_STRATEGY: "fetch"
ACCEPTANCE_ERROR_PATH: ${CI_PROJECT_DIR}/acceptance
MINIMAL_WP_TESTED_UP: "5.2"
MINIMAL_WC_TESTED_UP: "3.6.2"
stages:
- tools
- tests
- pre-deploy
- deploy
.template: &job-test-template
stage: tests
coverage: '/^\s*Lines:\s*\d+.\d+\%/'
artifacts:
reports:
junit: tmp_artifacts/report.xml
.template: &job-test-integration-template
<<: *job-test-template
services:
- mysql:5.6
script:
- echo ${WPDESK_CI_VERSION}
- ls -l
- php --version
- cat /tmp/wordpress-develop/src/wp-includes/version.php
- cat /tmp/woocommerce/woocommerce.php
- COMPOSER_MEMORY_LIMIT=-1 composer update --no-progress --prefer-dist
- if [[ -f tests/integration/prepare.sh ]]; then sh tests/integration/prepare.sh; fi
- vendor/bin/phpunit --configuration phpunit-integration.xml --coverage-text --colors=never --log-junit tmp_artifacts/report.xml
only:
- master
.template: &job-test-integration-template-fast
<<: *job-test-integration-template
script:
- echo ${WPDESK_CI_VERSION}
- ls -l
- php --version
- cat /tmp/wordpress-develop/src/wp-includes/version.php
- cat /tmp/woocommerce/woocommerce.php
- COMPOSER_MEMORY_LIMIT=-1 composer update --no-progress --prefer-dist
- if [[ -f tests/integration/prepare.sh ]]; then sh tests/integration/prepare.sh; fi
- vendor/bin/phpunit --configuration phpunit-integration.xml --no-coverage --log-junit tmp_artifacts/report.xml
except:
- tags
only:
.template: &job-test-unit-template
<<: *job-test-template
script:
- echo ${WPDESK_CI_VERSION}
- ls -l
- php --version
- cat /tmp/wordpress-develop/src/wp-includes/version.php
- cat /tmp/woocommerce/woocommerce.php
- COMPOSER_MEMORY_LIMIT=-1 composer update --no-progress --prefer-dist
- vendor/bin/phpunit --configuration phpunit-unit.xml --coverage-text --colors=never --log-junit tmp_artifacts/report.xml
only:
- master