update travis config
This commit is contained in:
parent
0de3718770
commit
7fbbbf6608
29
.travis.yml
29
.travis.yml
|
@ -1,5 +1,10 @@
|
|||
version: ~> 1.0
|
||||
|
||||
# This path will differ for projects using the published package.
|
||||
import:
|
||||
- source: tests/e2e/env/.travis.yml
|
||||
mode: deep_merge_prepend
|
||||
|
||||
language: php
|
||||
dist: xenial
|
||||
|
||||
|
@ -9,15 +14,6 @@ services:
|
|||
- mysql
|
||||
- docker
|
||||
|
||||
sudo: false
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- vendor
|
||||
- node_modules
|
||||
- $HOME/.npm
|
||||
- $HOME/.composer/cache
|
||||
|
||||
# Test main supported versions of PHP against latest WP.
|
||||
php:
|
||||
- 7.0
|
||||
|
@ -31,24 +27,11 @@ env:
|
|||
|
||||
# Additional tests against stable PHP (min version is 7.0)
|
||||
# and code coverage report.
|
||||
matrix:
|
||||
fast_finish: true
|
||||
jobs:
|
||||
include:
|
||||
- name: "Coding standard check"
|
||||
php: 7.4
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_PHPCS=1
|
||||
- name: "E2E Tests"
|
||||
php: 7.4
|
||||
env: WP_VERSION=latest WP_MULTISITE=0
|
||||
script:
|
||||
- bash tests/e2e/env/bin/before-script-CI.sh
|
||||
- composer require wp-cli/i18n-command
|
||||
- npm install
|
||||
- npm run build
|
||||
- npm run docker:up
|
||||
- npm run test:e2e
|
||||
after_script:
|
||||
- npm run docker:down
|
||||
- name: "Unit tests code coverage"
|
||||
php: 7.4
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
|
||||
|
|
|
@ -16,12 +16,6 @@ jobs:
|
|||
include:
|
||||
- name: "Core E2E Tests"
|
||||
php: 7.4
|
||||
env: WP_VERSION=latest WP_MULTISITE=0
|
||||
script:
|
||||
- bash bin/before-script-CI.sh
|
||||
- composer require wp-cli/i18n-command
|
||||
- npm run build
|
||||
- npm explore @woocommerce/e2e-environment -- npm run docker:up
|
||||
- npm explore @woocommerce/e2e-environment -- npm run test:e2e
|
||||
after_script:
|
||||
- npm explore @woocommerce/e2e-environment -- npm run docker:down
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CORE_E2E=1
|
||||
script:
|
||||
- npm explore @woocommerce/e2e-environment -- npm run test:e2e-CI
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Setup for Travis CI
|
||||
|
||||
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
|
||||
phpenv config-rm xdebug.ini
|
||||
else
|
||||
echo "xdebug.ini does not exist"
|
||||
fi
|
||||
|
||||
if [[ ! -z "$WP_VERSION" ]] ; then
|
||||
composer install --no-dev
|
||||
npm explore @woocommerce/e2e-environment -- npm run install-wp-tests -- wc_e2e_tests root ' ' localhost $WP_VERSION
|
||||
composer global require "phpunit/phpunit=4.8.*|5.7.*"
|
||||
fi
|
||||
|
||||
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
|
||||
composer install
|
||||
fi
|
||||
|
||||
npm install jest --global
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Script for Travis CI
|
||||
|
||||
if [[ ${RUN_CORE_E2E} == 1 ]]; then
|
||||
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
|
||||
phpenv config-rm xdebug.ini
|
||||
else
|
||||
echo "xdebug.ini does not exist"
|
||||
fi
|
||||
|
||||
if [[ ! -z "$WP_VERSION" ]] ; then
|
||||
composer install --no-dev
|
||||
npm explore @woocommerce/e2e-environment -- npm run install-wp-tests -- wc_e2e_tests root ' ' localhost $WP_VERSION
|
||||
composer global require "phpunit/phpunit=4.8.*|5.7.*"
|
||||
fi
|
||||
|
||||
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
|
||||
composer install
|
||||
fi
|
||||
|
||||
npm install jest --global
|
||||
composer require wp-cli/i18n-command
|
||||
npm run build
|
||||
npm explore @woocommerce/e2e-environment -- npm run docker:up
|
||||
npm explore @woocommerce/e2e-environment -- npm run test:e2e
|
||||
npm explore @woocommerce/e2e-environment -- npm run docker:down
|
||||
fi
|
|
@ -44,6 +44,7 @@
|
|||
"docker:ssh": "docker exec -it woocommerce_wordpress-www /bin/bash",
|
||||
"install-wp-tests": "./bin/install-wp-tests.sh",
|
||||
"test:e2e": "bash ./bin/wait-for-build.sh && ./bin/e2e-test-integration.js",
|
||||
"test:e2e-CI": "bash ./bin/e2e-CI.sh",
|
||||
"test:e2e-dev": "bash ./bin/wait-for-build.sh && ./bin/e2e-test-integration.js --dev"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue