forked from GoogleChromeLabs/pwa-wp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (43 loc) · 1.18 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
language: php
dist: trusty
addons:
apt:
packages:
# Needed for `xmllint`.
- libxml2-utils
notifications:
email:
on_success: never
on_failure: change
cache:
directories:
- $HOME/.composer/cache
- $HOME/.npm
- $HOME/.nvm/.cache
branches:
only:
- develop
install:
- composer install
- if [[ $WP_TRAVISCI == *"test"* ]]; then composer global require phpunit/phpunit "^$PHPUNIT_VERSION"; fi
- nvm install --lts && nvm use --lts
- npm install
- npm run build && rm -r build
script:
- if [[ $WP_TRAVISCI == *"lint"* ]]; then npm run lint; fi
- if [[ $WP_TRAVISCI == *"test"* ]]; then npm run test; fi
jobs:
include:
- stage: test
php: "7.3"
env: WP_VERSION=trunk PHPUNIT_VERSION=7 WP_TRAVISCI=lint,phpunit
- php: "7.2"
env: WP_VERSION=latest PHPUNIT_VERSION=7 WP_TRAVISCI=phpunit
- php: "7.1"
env: WP_VERSION=latest PHPUNIT_VERSION=7 WP_TRAVISCI=phpunit
- php: "7.0"
env: WP_VERSION=latest PHPUNIT_VERSION=6 WP_TRAVISCI=phpunit
- php: "5.6"
env: WP_VERSION=latest PHPUNIT_VERSION=5 WP_TRAVISCI=phpunit
- php: "5.6"
env: WP_VERSION=latest PHPUNIT_VERSION=5 WP_TRAVISCI=phpunit