-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path.travis.yml
58 lines (50 loc) · 1.46 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
58
# TravisCI configuration for php-stubs/wordpress-stubs
if: "branch = master"
language: "php"
os:
- "linux"
dist: "bionic"
php:
#- "8.1"
- "8.0"
- "7.4"
cache:
directories:
- "$HOME/.composer/cache"
before_install:
- "phpenv config-rm xdebug.ini"
- "composer validate --strict"
install:
- |
if ! php --ri sodium; then
# https://github.com/paragonie/sodium_compat/pull/104
#composer require --no-interaction --dev "paragonie/sodium_compat"
LIBSODIUM_VERSION="1.0.18"
wget "https://github.com/jedisct1/libsodium/releases/download/${LIBSODIUM_VERSION}-RELEASE/libsodium-${LIBSODIUM_VERSION}.tar.gz"
tar -xf libsodium-${LIBSODIUM_VERSION}.tar.gz
cd libsodium-${LIBSODIUM_VERSION}
./configure --prefix="${HOME}/libsodium"
make check
make install
cd -
LD_LIBRARY_PATH="${HOME}/libsodium/lib:${LD_LIBRARY_PATH}" \
PKG_CONFIG_PATH="${HOME}/libsodium/lib/pkgconfig:${PKG_CONFIG_PATH}" \
LDFLAGS="-L${HOME}/libsodium/lib" \
pecl install libsodium
php --ri sodium
fi
- "composer update --no-interaction"
- "composer run post-install-cmd"
before_script:
- "cat ./source/wordpress/wp-includes/version.php"
script:
# Generate stubs
- "./generate.sh"
# Check stubs syntax
- "php -l wordpress-stubs.php"
# Check stubs changes compared to repository
- "git diff --exit-code"
# Execute stubs
- "php -f wordpress-stubs.php"
# Run all tests
- "composer run test"