-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
45 lines (39 loc) · 1.11 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
# TravisCI configuration for php-stubs/wordpress-tests-stubs
language: "php"
os:
- "linux"
dist: "bionic"
php:
# - "8.2"
- "8.1"
- "8.0"
- "7.4"
- "7.3"
cache:
directories:
- "$HOME/.composer/cache"
before_install:
- "phpenv config-rm xdebug.ini"
- "composer validate --no-interaction --strict"
install:
- "composer update --no-interaction"
before_script:
- |
wget -q -O- "https://api.github.com/repos/WordPress/wordpress-develop/tarball/refs/tags/$(head -n 1 VERSION)" \
| tar -x -z --directory=source/ --strip-components=3 --wildcards "*/tests/phpunit/includes/"
script:
# Generate stubs
- "bash -x ./generate.sh"
# Check stubs syntax
- "php -l wordpress-tests-stubs.php"
# Check stubs changes compared to repository
- "git diff --exit-code"
# Execute stubs
- |
if dpkg --compare-versions "$(phpenv version-name)" ge "8.0"; then
composer require --dev "phpunit/phpunit:^9.0"
else
composer require --dev "phpunit/phpunit:^7.0"
fi
- |
php -r 'require "vendor/autoload.php"; require "extended-classes.php"; require "wordpress-tests-stubs.php";'