|
1 | 1 | language: php |
2 | | -dist: trusty |
3 | 2 |
|
4 | | -notifications: |
5 | | - email: |
6 | | - on_success: never |
7 | | - on_failure: change |
| 3 | +os: |
| 4 | + - linux |
8 | 5 |
|
9 | | -branches: |
10 | | - only: |
11 | | - - master |
| 6 | +dist: bionic |
12 | 7 |
|
13 | 8 | php: |
14 | | - - 5.6 |
15 | | - - 7.0 |
16 | | - - 7.1 |
17 | | - - 7.2 |
| 9 | + - 7.4 |
18 | 10 | - 7.3 |
| 11 | + - 7.2 |
| 12 | + - 7.1 |
19 | 13 | - nightly |
20 | 14 |
|
21 | 15 | env: |
22 | | - - WP_VERSION=latest WP_MULTISITE=0 |
23 | | - - WP_VERSION=latest WP_MULTISITE=1 |
| 16 | + - WP_VERSION=latest WP_MULTISITE=0 PHPUNIT_VERSION="^5.6" |
| 17 | + - WP_VERSION=latest WP_MULTISITE=1 PHPUNIT_VERSION="^5.6" |
| 18 | + |
| 19 | +services: |
| 20 | + - mysql |
24 | 21 |
|
25 | | -matrix: |
| 22 | +jobs: |
| 23 | + include: |
| 24 | + - php: 7.0 |
| 25 | + dist: xenial |
| 26 | + env: |
| 27 | + - WP_VERSION=latest WP_MULTISITE=0 PHPUNIT_VERSION="^5.6" |
| 28 | + - WP_VERSION=latest WP_MULTISITE=1 PHPUNIT_VERSION="^5.6" |
| 29 | + - php: 5.6 |
| 30 | + dist: xenial |
| 31 | + env: |
| 32 | + - WP_VERSION=latest WP_MULTISITE=0 PHPUNIT_VERSION="4.8.*" |
| 33 | + - WP_VERSION=latest WP_MULTISITE=1 PHPUNIT_VERSION="4.8.*" |
| 34 | + - name: "Coding Standars" |
| 35 | + php: 7.4 |
| 36 | + install: |
| 37 | + - composer require --dev wp-coding-standards/wpcs dealerdirect/phpcodesniffer-composer-installer |
| 38 | + script: |
| 39 | + - vendor/bin/phpcs |
| 40 | + - name: "Static Analysis" |
| 41 | + php: 7.4 |
| 42 | + install: |
| 43 | + - composer require --dev szepeviktor/phpstan-wordpress |
| 44 | + script: |
| 45 | + - vendor/bin/phpstan analyze |
26 | 46 | allow_failures: |
27 | 47 | - php: nightly |
28 | 48 |
|
29 | | -before_script: |
30 | | - - bash bin/install-wp-tests.sh wordpress_test root "" localhost $WP_VERSION |
31 | | - - export PATH="$HOME/.composer/vendor/bin:$PATH" |
32 | | - - | |
33 | | - if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]]; then |
34 | | - composer global require "phpunit/phpunit=^5.6" |
35 | | - else |
36 | | - composer global require "phpunit/phpunit=4.8.*" |
37 | | - fi |
38 | | - - | |
39 | | - composer global require wp-coding-standards/wpcs |
40 | | - phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs |
41 | | - - | |
42 | | - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then |
43 | | - composer require "szepeviktor/phpstan-wordpress:^0.5.0" |
44 | | - fi |
45 | | -
|
46 | | -script: |
47 | | - - phpcs --standard=phpcs.ruleset.xml $(find -name "*.php") |
48 | | - - | |
49 | | - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then |
50 | | - vendor/bin/phpstan analyze |
51 | | - fi |
52 | | - - phpunit |
| 49 | +branches: |
| 50 | + only: |
| 51 | + - master |
53 | 52 |
|
54 | 53 | cache: |
55 | 54 | directories: |
56 | | - - $HOME/.composer/cache |
| 55 | + - "${HOME}/.composer/cache" |
| 56 | + |
| 57 | +before_install: |
| 58 | + - composer remove --dev stevegrunwell/wp-enforcer |
| 59 | + # Shim Composer's post-install-cmd script |
| 60 | + - install -T /dev/null vendor/bin/wp-enforcer |
| 61 | + |
| 62 | +install: |
| 63 | + - bin/install-wp-tests.sh wordpress_test root "" localhost "${WP_VERSION}" |
| 64 | + - composer global require --dev "phpunit/phpunit=${PHPUNIT_VERSION}" |
| 65 | + |
| 66 | +script: |
| 67 | + - "${HOME}/.composer/vendor/bin/phpunit" |
| 68 | + |
| 69 | +notifications: |
| 70 | + email: |
| 71 | + on_success: never |
| 72 | + on_failure: change |
0 commit comments