-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
39 lines (32 loc) · 1009 Bytes
/
.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
# TravisCI configuration for php-stubs/woocommerce-stubs
language: "php"
os:
- "linux"
dist: "bionic"
cache:
directories:
- "$HOME/.composer/cache"
php:
- "8.1"
- "8.0"
- "7.4"
before_install:
- "phpenv config-rm xdebug.ini"
- "composer validate --strict"
install:
- "composer update --no-interaction"
## Reinstall sub-packages into /packages/
#- "composer update --no-interaction"
- |
LATEST="$(jq -r '."require"."woocommerce/woocommerce"' source/composer.json)"
wget -P source/ "https://downloads.wordpress.org/plugin/woocommerce.${LATEST}.zip"
unzip -q -d source/ "source/woocommerce.${LATEST}.zip"
before_script:
- "cat ./source/woocommerce/woocommerce.php"
script:
- "bash -x ./generate.sh"
- "php -l woocommerce-stubs.php"
- "php -l woocommerce-packages-stubs.php"
- "git diff --exit-code"
- |
php -r 'require "vendor/php-stubs/wordpress-stubs/wordpress-stubs.php"; require "woocommerce-stubs.php"; require "woocommerce-packages-stubs.php";'