add PHP 7.3 to Travis unit tests (https://github.com/woocommerce/woocommerce-admin/pull/3552)
* add PHP 7.3 to Travis unit tests * add note indicating phpunit version requirement * add COMPOSER_DEV env variable for composer install
This commit is contained in:
parent
69d1388b95
commit
614c5b7cdf
|
@ -6,15 +6,18 @@ dist: trusty
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: "PHP 7.2 unit tests, PHP Coding standards check and JS tests"
|
- name: "PHP 7.3 unit tests, PHP Coding standards check and JS tests"
|
||||||
|
php: 7.3
|
||||||
|
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress RUN_PHPCS=1 RUN_JS=1 COMPOSER_DEV=1
|
||||||
|
- name: "PHP 7.3 unit tests, run in random order"
|
||||||
|
php: 7.3
|
||||||
|
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress RUN_RANDOM=1 COMPOSER_DEV=1
|
||||||
|
- name: "PHP 7.2 unit tests"
|
||||||
php: 7.2
|
php: 7.2
|
||||||
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress RUN_PHPCS=1 RUN_JS=1
|
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress COMPOSER_DEV=1
|
||||||
- name: "PHP 7.2 unit tests, run in random order"
|
|
||||||
php: 7.2
|
|
||||||
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress RUN_RANDOM=1
|
|
||||||
- name: "PHP 7.1 unit tests"
|
- name: "PHP 7.1 unit tests"
|
||||||
php: 7.1
|
php: 7.1
|
||||||
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress
|
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress COMPOSER_DEV=1
|
||||||
- name: "PHP 7.0 unit tests"
|
- name: "PHP 7.0 unit tests"
|
||||||
php: 7.0
|
php: 7.0
|
||||||
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress
|
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress
|
||||||
|
@ -22,8 +25,8 @@ matrix:
|
||||||
php: 5.6
|
php: 5.6
|
||||||
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress
|
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress
|
||||||
allow_failures:
|
allow_failures:
|
||||||
php: 7.2
|
php: 7.3
|
||||||
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress RUN_RANDOM=1
|
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress RUN_RANDOM=1 COMPOSER_DEV=1
|
||||||
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
WORKING_DIR="$PWD"
|
WORKING_DIR="$PWD"
|
||||||
cd "$WP_CORE_DIR/wp-content/plugins/woocommerce-admin/"
|
cd "$WP_CORE_DIR/wp-content/plugins/woocommerce-admin/"
|
||||||
phpunit --version
|
if [[ {$COMPOSER_DEV} == 1 ]]; then
|
||||||
if [[ {$RUN_RANDOM} == 1 ]]; then
|
./vendor/bin/phpunit --version
|
||||||
./vendor/bin/phpunit -c phpunit.xml.dist --order-by=random
|
if [[ {$RUN_RANDOM} == 1 ]]; then
|
||||||
|
./vendor/bin/phpunit -c phpunit.xml.dist --order-by=random
|
||||||
|
else
|
||||||
|
./vendor/bin/phpunit -c phpunit.xml.dist
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
|
phpunit --version
|
||||||
phpunit -c phpunit.xml.dist
|
phpunit -c phpunit.xml.dist
|
||||||
fi
|
fi
|
||||||
TEST_RESULT=$?
|
TEST_RESULT=$?
|
||||||
|
|
|
@ -4,10 +4,9 @@
|
||||||
if [ "$1" == 'before' ]; then
|
if [ "$1" == 'before' ]; then
|
||||||
cd "$WP_CORE_DIR/wp-content/plugins/woocommerce-admin/"
|
cd "$WP_CORE_DIR/wp-content/plugins/woocommerce-admin/"
|
||||||
npm run build:feature-config
|
npm run build:feature-config
|
||||||
if [[ "$RUN_PHPCS" == "1" || "$RUN_RANDOM" == "1" ]]; then
|
if [[ "$COMPOSER_DEV" == "1" ]]; then
|
||||||
composer install
|
composer install
|
||||||
else
|
else
|
||||||
composer install --no-dev
|
composer install --no-dev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
"automattic/jetpack-autoloader": "1.3.7"
|
"automattic/jetpack-autoloader": "1.3.7"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "7.5.18",
|
"phpunit/phpunit": "7.5.20",
|
||||||
"woocommerce/woocommerce-sniffs": "0.0.9"
|
"woocommerce/woocommerce-sniffs": "0.0.9"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "43ec4eccc762bc3075f2ad6a26691444",
|
"content-hash": "2ad688c0caf3f4ea1cc7868676f5dbb6",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "automattic/jetpack-autoloader",
|
"name": "automattic/jetpack-autoloader",
|
||||||
|
@ -290,16 +290,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "myclabs/deep-copy",
|
"name": "myclabs/deep-copy",
|
||||||
"version": "1.9.4",
|
"version": "1.9.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/myclabs/DeepCopy.git",
|
"url": "https://github.com/myclabs/DeepCopy.git",
|
||||||
"reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7"
|
"reference": "b2c28789e80a97badd14145fda39b545d83ca3ef"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/579bb7356d91f9456ccd505f24ca8b667966a0a7",
|
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef",
|
||||||
"reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7",
|
"reference": "b2c28789e80a97badd14145fda39b545d83ca3ef",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -334,7 +334,7 @@
|
||||||
"object",
|
"object",
|
||||||
"object graph"
|
"object graph"
|
||||||
],
|
],
|
||||||
"time": "2019-12-15T19:12:40+00:00"
|
"time": "2020-01-17T21:11:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phar-io/manifest",
|
"name": "phar-io/manifest",
|
||||||
|
@ -751,24 +751,24 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpspec/prophecy",
|
"name": "phpspec/prophecy",
|
||||||
"version": "1.10.1",
|
"version": "v1.10.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpspec/prophecy.git",
|
"url": "https://github.com/phpspec/prophecy.git",
|
||||||
"reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc"
|
"reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc",
|
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9",
|
||||||
"reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc",
|
"reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"doctrine/instantiator": "^1.0.2",
|
"doctrine/instantiator": "^1.0.2",
|
||||||
"php": "^5.3|^7.0",
|
"php": "^5.3|^7.0",
|
||||||
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
|
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
|
||||||
"sebastian/comparator": "^1.2.3|^2.0|^3.0",
|
"sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
|
||||||
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
|
"sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpspec/phpspec": "^2.5 || ^3.2",
|
"phpspec/phpspec": "^2.5 || ^3.2",
|
||||||
|
@ -810,7 +810,7 @@
|
||||||
"spy",
|
"spy",
|
||||||
"stub"
|
"stub"
|
||||||
],
|
],
|
||||||
"time": "2019-12-22T21:05:45+00:00"
|
"time": "2020-01-20T15:57:02+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
|
@ -1066,16 +1066,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "7.5.18",
|
"version": "7.5.20",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "fcf6c4bfafaadc07785528b06385cce88935474d"
|
"reference": "9467db479d1b0487c99733bb1e7944d32deded2c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fcf6c4bfafaadc07785528b06385cce88935474d",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c",
|
||||||
"reference": "fcf6c4bfafaadc07785528b06385cce88935474d",
|
"reference": "9467db479d1b0487c99733bb1e7944d32deded2c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1146,7 +1146,7 @@
|
||||||
"testing",
|
"testing",
|
||||||
"xunit"
|
"xunit"
|
||||||
],
|
],
|
||||||
"time": "2019-12-06T05:14:37+00:00"
|
"time": "2020-01-08T08:45:45+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/code-unit-reverse-lookup",
|
"name": "sebastian/code-unit-reverse-lookup",
|
||||||
|
|
Loading…
Reference in New Issue