forked from liquidweb/woocommerce-custom-orders-table
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
91 lines (83 loc) · 2.29 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
language: php
sudo: false
dist: trusty
notifications:
email: false
cache:
directories:
- $HOME/.composer/cache
php:
- 7.4snapshot
- 7.3
- 7.2
- 7.1
- 7.0
# Compatibility policy:
#
# - WordPress: latest -1
# - WooCommerce: latest -2
#
# Note: Since WordPress 5.0+ requires WooCommerce 3.5.1+, we don't need to go back
# to WooCommerce 3.4.x. Once 3.7.x is released,
env:
- WP_VERSION=5.2 WC_VERSION=3.6
- WP_VERSION=5.2 WC_VERSION=3.5
- WP_VERSION=5.1 WC_VERSION=3.6
- WP_VERSION=5.1 WC_VERSION=3.5
matrix:
fast_finish: true
include:
- name: Coding Standards
php: 7.2
env: WP_VERSION=latest WC_VERSION=latest RUN_PHPCS=1
- name: Code Coverage
php: 7.2
env: WP_VERSION=latest WC_VERSION=latest RUN_CODE_COVERAGE=1
- name: Bleeding Edge
php: nightly
env: WP_VERSION=trunk WC_VERSION=latest
allow_failures:
- php: 7.4snapshot
- name: Code Coverage
php: 7.2
env: WP_VERSION=latest WC_VERSION=latest RUN_CODE_COVERAGE=1
- name: Bleeding Edge
php: nightly
env: WP_VERSION=trunk WC_VERSION=latest
before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [[ ${RUN_CODE_COVERAGE} ]]; then
wget https://github.com/php-coveralls/php-coveralls/releases/download/v1.0.0/coveralls.phar
chmod +x coveralls.phar
mkdir -p build/logs
fi
- phpenv config-rm xdebug.ini || true
- |
if [[ ${GITHUB_AUTH_TOKEN} != '' ]]; then
composer config -g github-oauth.github.com $GITHUB_AUTH_TOKEN
fi
- bash tests/bin/install-wp-tests.sh woocommerce_test root '' localhost $WP_VERSION
- bash tests/bin/set-woocommerce-version.sh $WC_VERSION
- |
if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then
composer update --prefer-source --prefer-lowest --no-interaction --no-ansi
else
composer install --prefer-source --no-interaction --no-ansi
fi
script:
- |
if [[ ${RUN_CODE_COVERAGE} ]]; then
phpdbg -qrr -d memory_limit=-1 ./vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover=build/logs/clover.xml --exclude-group=timeout
else
./vendor/bin/phpunit
fi
- |
if [[ ${RUN_PHPCS} == 1 ]]; then
./vendor/bin/phpcs
fi
after_success:
- |
if [[ ${RUN_CODE_COVERAGE} ]]; then
travis_retry php coveralls.phar
fi