forked from GoogleChromeLabs/pwa-wp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (49 loc) · 1.54 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
# Tell Travis CI we're using PHP
language: php
# Opt to use Travis container-based environment.
sudo: false
# Newer versions like trusty don't have PHP 5.2 or 5.3
# https://blog.travis-ci.com/2017-07-11-trusty-as-default-linux-is-coming
dist: precise
notifications:
email:
on_success: never
on_failure: change
cache:
directories:
- node_modules
- vendor
- $HOME/phpunit-bin
- $HOME/deployment-targets
install:
- if [[ $TRAVIS_PHP_VERSION == "5.2" ]]; then phpenv local 5.6.13; composer install --no-dev; fi # Temporarily switch PHP version so Composer can be invoked.
- nvm install 6 && nvm use 6
- npm install
- export DEV_LIB_PATH=node_modules/wp-dev-lib
- source $DEV_LIB_PATH/travis.install.sh
- if [[ $TRAVIS_PHP_VERSION == "5.2" ]]; then phpenv local --unset; fi # Reset original PHP.
script:
- source $DEV_LIB_PATH/travis.script.sh
after_script:
- source $DEV_LIB_PATH/travis.after_script.sh
jobs:
include:
- stage: test
php: "7.2"
env: WP_VERSION=trunk
- php: "5.2"
env: WP_VERSION=latest DEV_LIB_SKIP=composer,phpcs
- php: "5.3"
env: WP_VERSION=latest DEV_LIB_SKIP=composer,phpcs
- php: "5.4"
env: WP_VERSION=latest DEV_LIB_SKIP=composer,phpcs
- php: "5.5"
env: WP_VERSION=latest DEV_LIB_SKIP=phpcs
- php: "5.6"
env: WP_VERSION=latest DEV_LIB_SKIP=phpcs
- php: "5.6"
env: WP_VERSION=latest DEV_LIB_SKIP=phpcs
- php: "7.0"
env: WP_VERSION=latest DEV_LIB_SKIP=phpcs
- php: "7.1"
env: WP_VERSION=latest DEV_LIB_SKIP=phpcs