-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update travis and tests configuration
Travis no longer supports PHP 5.4 on the default machine, so this updates that and tests some newer version as well. A little bit of a workaround is required to test PHP 7
- Loading branch information
1 parent
bb00c71
commit 8ff92fc
Showing
2 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
dist: trusty | ||
language: php | ||
|
||
php: | ||
- 5.4 | ||
- 5.6 | ||
- 7.1 | ||
|
||
env: | ||
- WP_VERSION=latest WP_MULTISITE=0 | ||
- WP_VERSION=latest WP_MULTISITE=1 | ||
- WP_VERSION=3.8 WP_MULTISITE=0 | ||
- WP_VERSION=3.8 WP_MULTISITE=1 | ||
- WP_VERSION=4.0 WP_MULTISITE=0 | ||
- WP_VERSION=4.0 WP_MULTISITE=1 | ||
|
||
before_script: | ||
- composer self-update | ||
- composer install --prefer-source --no-interaction --dev | ||
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION | ||
- chmod +x tests/init.sh && bash tests/init.sh $TRAVIS_PHP_VERSION $WP_VERSION | ||
|
||
script: phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
TRAVIS_PHP_VERSION=${1-0} | ||
WP_VERSION=${2-latest} | ||
|
||
echo "[init-tests.sh] TRAVIS_PHP_VERSION=$TRAVIS_PHP_VERSION" | ||
echo "[init-tests.sh] WP_VERSION=$WP_VERSION" | ||
|
||
# PHP 7 is incompatible with WordPress v4 and lower so we force WordPress 5.0 | ||
if [[ $TRAVIS_PHP_VERSION == "7.1"* && $WP_VERSION == 4.0 ]]; then | ||
echo "[notice] PHP 7 is incompatible with WordPress v4 and lower. Forcing WordPress 5.0." | ||
WP_VERSION=5.0 | ||
else | ||
: | ||
fi | ||
|
||
echo "[init-tests.sh] Using WP_VERSION $WP_VERSION" | ||
|
||
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION |