forked from woocommerce/woocommerce-gateway-stripe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (41 loc) · 1.12 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
language: php
sudo: false
# Test main supported versions of PHP against latest WP. 5.2 is min supported PHP version.
php:
- 5.6
- 7.0
- 7.1
services:
- mysql
env:
- WP_VERSION=latest WP_MULTISITE=0 WC_VERSION=3.4.5
before_script:
- |
if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then
echo "downloading phpunit 6 and rename to phpunit.phar"
wget https://phar.phpunit.de/phpunit-6.phar
mv phpunit-6.phar phpunit.phar
fi
- |
if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then
echo "downloading phpunit 7 and rename to phpunit.phar"
wget https://phar.phpunit.de/phpunit-7.phar
mv phpunit-7.phar phpunit.phar
fi
- phpenv config-rm xdebug.ini
- bash tests/bin/install.sh wc_stripe_test root '' localhost $WP_VERSION
- bash tests/bin/travis.sh before
script:
- |
if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]] ||
[[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then
php phpunit.phar -c phpunit.xml
else
phpunit
fi
#save node_modules to speed up build
cache:
directories:
- node_modules
after_script:
- bash tests/bin/travis.sh after