|
3 | 3 | # Tell Travis CI we're using PHP
|
4 | 4 | language: php
|
5 | 5 |
|
6 |
| -# PHP version used in first build configuration. |
7 |
| -php: |
8 |
| - - 5.6 |
9 |
| - |
10 |
| -# WordPress version used in first build configuration. |
11 |
| -env: |
12 |
| - - WP_VERSION=latest |
13 |
| - |
14 |
| -# Next we define our matrix of additional build configurations to test against. |
15 |
| -# The versions listed above will automatically create our first configuration, |
16 |
| -# so it doesn't need to be re-defined below. |
17 |
| - |
18 |
| -# Test WP trunk/master and two latest versions on minimum (5.2). |
19 |
| -# Test WP latest two versions (4.4, 4.4) on most popular (5.5, 5.6). |
20 |
| -# Test WP latest stable (4.4) on other supported PHP (5.3, 5.4). |
21 |
| -# Test WP trunk/master on edge platforms (7.0, hhvm, PHP nightly). |
22 |
| - |
23 |
| -# WP_VERSION specifies the tag to use. The way these tests are configured to run |
24 |
| -# requires at least WordPress 3.8. Specify "master" to test against SVN trunk. |
25 |
| - |
| 6 | +# Define our matrix of build configurations to test against. |
26 | 7 | matrix:
|
27 | 8 | include:
|
28 |
| - - php: 5.2 |
29 |
| - env: WP_VERSION=latest WC_VERSION=2.6.14 |
30 |
| - sudo: true |
31 |
| - dist: precise |
32 | 9 | - php: 5.2
|
33 | 10 | env: WP_VERSION=4.4 WC_VERSION=2.6.14
|
34 | 11 | sudo: true
|
35 | 12 | dist: precise
|
36 |
| - - php: 5.3 |
37 |
| - env: WP_VERSION=latest WC_VERSION=2.6.14 |
| 13 | + - php: 5.2 |
| 14 | + env: WP_VERSION=latest WC_VERSION=3.3.3 |
38 | 15 | sudo: true
|
39 | 16 | dist: precise
|
40 | 17 | - php: 5.3
|
41 |
| - env: WP_VERSION=4.4 WC_VERSION=2.6.14 |
| 18 | + env: WP_VERSION=4.5 WC_VERSION=3.2.6 |
42 | 19 | sudo: true
|
43 | 20 | dist: precise
|
44 | 21 | - php: 5.4
|
45 |
| - env: WP_VERSION=latest WC_VERSION=2.6.14 |
46 |
| - - php: 5.4 |
47 |
| - env: WP_VERSION=4.4 WC_VERSION=2.6.14 |
| 22 | + env: WP_VERSION=4.6 WC_VERSION=3.1.2 |
48 | 23 | - php: 5.5
|
| 24 | + env: WP_VERSION=4.7 WC_VERSION=3.0.9 |
| 25 | + - php: 5.6 |
| 26 | + env: WP_VERSION=4.8 WC_VERSION=2.6.14 |
| 27 | + - php: 7.0 |
49 | 28 | env: WP_VERSION=latest WC_VERSION=2.6.14
|
50 |
| - - php: 5.5 |
51 |
| - env: WP_VERSION=4.4 WC_VERSION=2.6.14 |
52 |
| - - php: 5.5 |
| 29 | + - php: 7.1 |
53 | 30 | env: WP_VERSION=latest WC_VERSION=3.0.3
|
54 |
| - # 5.6 / master already included above as first build. |
55 |
| - - php: 5.6 |
| 31 | + - php: 7.2 |
56 | 32 | env: WP_VERSION=4.4 WC_VERSION=2.6.14
|
57 |
| - - php: 5.6 |
58 |
| - env: WP_VERSION=4.4 WC_VERSION=3.0.3 |
59 |
| - |
60 |
| -# Cache the NPM dependencies |
61 |
| -cache: |
62 |
| - directories: |
63 |
| - - node_modules |
64 |
| - - "$HOME/.nvm" |
65 |
| - |
66 |
| -# Use an updated Node runtime |
67 |
| -# See: http://entulho.fiatjaf.alhur.es/guias/how-to-use-node-along-with-other-language-on-travis-ci/ |
68 |
| -install: |
69 |
| - - . $HOME/.nvm/nvm.sh |
70 |
| - - nvm install 8.9.3 |
71 |
| - - nvm use 8.9.3 |
72 |
| - - npm install |
| 33 | + # Older versions of WP are not compatible with PHPUnit 6+. Manually install PHPUnit 5. |
| 34 | + script: curl -sSfL -o ~/.phpenv/versions/7.2/bin/phpunit https://phar.phpunit.de/phpunit-5.7.phar && phpunit |
| 35 | + - php: 7.2 |
| 36 | + env: WP_VERSION=latest WC_VERSION=3.3.3 |
| 37 | + # Not even the latest WP version is compatible with PHPUnit 7. Manually install PHPUnit 6. |
| 38 | + script: curl -sSfL -o ~/.phpenv/versions/7.2/bin/phpunit https://phar.phpunit.de/phpunit-6.4.phar && phpunit |
| 39 | + # Run the JS tests in a separate container |
| 40 | + - language: node_js |
| 41 | + before_script: "" |
73 | 42 |
|
74 | 43 | # Clones WordPress and configures our testing environment.
|
75 |
| -before_script: |
76 |
| - - bash tests/bin/install-wc-tests.sh wordpress_test root '' localhost $WP_VERSION $WC_VERSION |
77 |
| - |
78 |
| -script: phpunit && npm test |
| 44 | +before_script: bash tests/bin/install-wc-tests.sh wordpress_test root '' localhost $WP_VERSION $WC_VERSION |
79 | 45 |
|
80 | 46 | sudo: false
|
81 | 47 |
|
|
0 commit comments