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