Skip to content
Snippets Groups Projects

WIP: Add tests

Closed Erick Hitter requested to merge add/tests into develop
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
+ 14
0
@@ -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
 
PECL_REDIS_VERSION: 'redis'
WP_VERSION: latest
WP_VERSION: latest
cache:
cache:
@@ -13,6 +14,10 @@ before_script:
@@ -13,6 +14,10 @@ before_script:
# Set up WordPress tests
# Set up WordPress tests
- bash bin/install-wp-tests.sh $MYSQL_DATABASE root $MYSQL_ROOT_PASSWORD mysql $WP_VERSION true
- bash bin/install-wp-tests.sh $MYSQL_DATABASE root $MYSQL_ROOT_PASSWORD mysql $WP_VERSION true
 
# Install PECL extension we rely on
 
- pecl config-set php_ini /tmp/php.ini
 
- yes '' | pecl install -f $PECL_REDIS_VERSION
 
# PHPUnit
# PHPUnit
- |
- |
if [[ $(php -v) =~ "PHP 7." ]]; then
if [[ $(php -v) =~ "PHP 7." ]]; then
@@ -25,18 +30,23 @@ PHPunit:PHP5.3:MySQL:
@@ -25,18 +30,23 @@ PHPunit:PHP5.3:MySQL:
stage: test
stage: test
variables:
variables:
WP_VERSION: '5.1'
WP_VERSION: '5.1'
 
PECL_REDIS_VERSION: 'redis-2.2.8'
image: containers.ethitter.com:443/docker/images/php:5.3
image: containers.ethitter.com:443/docker/images/php:5.3
services:
services:
- mysql:5.6
- mysql:5.6
 
- redis:latest
script:
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpunit
- phpunit
PHPunit:PHP5.6:MySQL:
PHPunit:PHP5.6:MySQL:
stage: test
stage: test
 
variables:
 
PECL_REDIS_VERSION: 'redis-2.2.8'
image: containers.ethitter.com:443/docker/images/php:5.6
image: containers.ethitter.com:443/docker/images/php:5.6
services:
services:
- mysql:5.6
- mysql:5.6
 
- redis:latest
script:
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpunit
- phpunit
@@ -46,6 +56,7 @@ PHPunit:PHP7.0:MySQL:
@@ -46,6 +56,7 @@ PHPunit:PHP7.0:MySQL:
image: containers.ethitter.com:443/docker/images/php:7.0
image: containers.ethitter.com:443/docker/images/php:7.0
services:
services:
- mysql:5.6
- mysql:5.6
 
- redis:latest
script:
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpunit
- phpunit
@@ -55,6 +66,7 @@ PHPunit:PHP7.1:MySQL:
@@ -55,6 +66,7 @@ PHPunit:PHP7.1:MySQL:
image: containers.ethitter.com:443/docker/images/php:7.1
image: containers.ethitter.com:443/docker/images/php:7.1
services:
services:
- mysql:5.6
- mysql:5.6
 
- redis:latest
script:
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpunit
- phpunit
@@ -64,6 +76,7 @@ PHPunit:PHP7.2:MySQL:
@@ -64,6 +76,7 @@ PHPunit:PHP7.2:MySQL:
image: containers.ethitter.com:443/docker/images/php:7.2
image: containers.ethitter.com:443/docker/images/php:7.2
services:
services:
- mysql:5.6
- mysql:5.6
 
- redis:latest
script:
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpunit
- phpunit
@@ -73,6 +86,7 @@ PHPunit:PHP7.3:MySQL:
@@ -73,6 +86,7 @@ PHPunit:PHP7.3:MySQL:
image: containers.ethitter.com:443/docker/images/php:7.3
image: containers.ethitter.com:443/docker/images/php:7.3
services:
services:
- mysql:5.6
- mysql:5.6
 
- redis:latest
script:
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpunit
- phpunit
Loading