Skip to content
Snippets Groups Projects
Commit 1a0a00af authored by Erick Hitter's avatar Erick Hitter
Browse files

Merge branch 'fix/5.3-test' into 'master'

Revise test matrix

See merge request !5
parents 233e4d14 5084cc8a
Branches add/scaffolding
No related tags found
1 merge request!5Revise test matrix
Pipeline #1314 failed with stages
in 13 minutes and 18 seconds
...@@ -2,6 +2,7 @@ variables: ...@@ -2,6 +2,7 @@ variables:
# Configure mysql service (https://hub.docker.com/_/mysql/) # Configure mysql service (https://hub.docker.com/_/mysql/)
MYSQL_DATABASE: wordpress_tests MYSQL_DATABASE: wordpress_tests
MYSQL_ROOT_PASSWORD: mysql MYSQL_ROOT_PASSWORD: mysql
WP_VERSION: latest
cache: cache:
paths: paths:
...@@ -10,7 +11,7 @@ cache: ...@@ -10,7 +11,7 @@ cache:
before_script: before_script:
# Set up WordPress tests # Set up WordPress tests
- bash bin/install-wp-tests.sh $MYSQL_DATABASE root $MYSQL_ROOT_PASSWORD mysql latest true - bash bin/install-wp-tests.sh $MYSQL_DATABASE root $MYSQL_ROOT_PASSWORD mysql $WP_VERSION true
# PHPUnit # PHPUnit
- | - |
...@@ -20,11 +21,6 @@ before_script: ...@@ -20,11 +21,6 @@ before_script:
composer global require "phpunit/phpunit=4.8.*" composer global require "phpunit/phpunit=4.8.*"
fi fi
# Install PHPCS and WPCS
- composer global require automattic/vipwpcs
- composer global require phpcompatibility/phpcompatibility-wp
- phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs,$HOME/.composer/vendor/automattic/vipwpcs,$HOME/.composer/vendor/phpcompatibility/php-compatibility,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp
PHP5.3: PHP5.3:
stage: test stage: test
image: containers.ethitter.com:443/docker/images/php:5.3 image: containers.ethitter.com:443/docker/images/php:5.3
...@@ -32,9 +28,17 @@ PHP5.3: ...@@ -32,9 +28,17 @@ PHP5.3:
- mysql:5.6 - mysql:5.6
script: script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l - find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpcs -n
- phpunit - phpunit
allow_failure: true
PHP5.3:WP45:
stage: test
image: containers.ethitter.com:443/docker/images/php:5.3
services:
- mysql:5.6
variables:
WP_VERSION: '4.5'
script:
- phpunit
PHP5.6: PHP5.6:
stage: test stage: test
...@@ -43,7 +47,6 @@ PHP5.6: ...@@ -43,7 +47,6 @@ PHP5.6:
- mysql:5.6 - mysql:5.6
script: script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l - find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpcs -n
- phpunit - phpunit
PHP7.0: PHP7.0:
...@@ -53,7 +56,6 @@ PHP7.0: ...@@ -53,7 +56,6 @@ PHP7.0:
- mysql:5.6 - mysql:5.6
script: script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l - find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpcs -n
- phpunit - phpunit
PHP7.1: PHP7.1:
...@@ -63,7 +65,6 @@ PHP7.1: ...@@ -63,7 +65,6 @@ PHP7.1:
- mysql:5.6 - mysql:5.6
script: script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l - find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpcs -n
- phpunit - phpunit
PHP7.2: PHP7.2:
...@@ -73,7 +74,6 @@ PHP7.2: ...@@ -73,7 +74,6 @@ PHP7.2:
- mysql:5.6 - mysql:5.6
script: script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l - find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpcs -n
- phpunit - phpunit
PHP7.3: PHP7.3:
...@@ -83,9 +83,18 @@ PHP7.3: ...@@ -83,9 +83,18 @@ PHP7.3:
- mysql:5.6 - mysql:5.6
script: script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l - find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpcs -n
- phpunit - phpunit
PHPCS:
stage: test
image: containers.ethitter.com:443/docker/images/php:7.3
before_script:
- composer global require automattic/vipwpcs
- composer global require phpcompatibility/phpcompatibility-wp
- phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs,$HOME/.composer/vendor/automattic/vipwpcs,$HOME/.composer/vendor/phpcompatibility/php-compatibility,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp
script:
- phpcs -n
PluginSVN: PluginSVN:
stage: deploy stage: deploy
image: containers.ethitter.com:443/docker/wp-org-plugin-deploy:latest image: containers.ethitter.com:443/docker/wp-org-plugin-deploy:latest
......
...@@ -49,9 +49,9 @@ class AdminCallbacks extends WP_UnitTestCase { ...@@ -49,9 +49,9 @@ class AdminCallbacks extends WP_UnitTestCase {
$this->plugin = external_permalinks_redux::get_instance(); $this->plugin = external_permalinks_redux::get_instance();
$this->post_id = $this->factory->post->create( $this->post_id = $this->factory->post->create(
[ array(
'post_type' => 'post', 'post_type' => 'post',
] )
); );
$this->nonce = wp_create_nonce( 'external-permalinks-redux' ); $this->nonce = wp_create_nonce( 'external-permalinks-redux' );
......
...@@ -37,17 +37,17 @@ class PermalinkFilters extends WP_UnitTestCase { ...@@ -37,17 +37,17 @@ class PermalinkFilters extends WP_UnitTestCase {
$plugin = external_permalinks_redux::get_instance(); $plugin = external_permalinks_redux::get_instance();
$this->post_id = $this->factory->post->create( $this->post_id = $this->factory->post->create(
[ array(
'post_type' => 'post', 'post_type' => 'post',
] )
); );
update_post_meta( $this->post_id, $plugin->meta_key_target, static::DESTINATION ); update_post_meta( $this->post_id, $plugin->meta_key_target, static::DESTINATION );
$this->page_id = $this->factory->post->create( $this->page_id = $this->factory->post->create(
[ array(
'post_type' => 'page', 'post_type' => 'page',
] )
); );
update_post_meta( $this->page_id, $plugin->meta_key_target, static::DESTINATION ); update_post_meta( $this->page_id, $plugin->meta_key_target, static::DESTINATION );
......
...@@ -37,9 +37,9 @@ class RedirectCallbacks extends WP_UnitTestCase { ...@@ -37,9 +37,9 @@ class RedirectCallbacks extends WP_UnitTestCase {
*/ */
protected function get_new_post() { protected function get_new_post() {
return $this->factory->post->create( return $this->factory->post->create(
[ array(
'post_type' => 'post', 'post_type' => 'post',
] )
); );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment