-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from bu-ist/hotfix/phpunit-test-fix
Hotfix/Fix phpunit tests
- Loading branch information
Showing
5 changed files
with
81 additions
and
44 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,51 +1,63 @@ | ||
language: php | ||
|
||
sudo: false | ||
dist: trusty | ||
|
||
language: php | ||
|
||
php: | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: change | ||
|
||
env: | ||
- WP_VERSION=nightly | ||
- WP_VERSION=latest | ||
- WP_VERSION=4.7 | ||
- WP_VERSION=4.6 | ||
branches: | ||
only: | ||
- /.*/ | ||
|
||
cache: | ||
directories: | ||
- vendor | ||
- $HOME/.composer/cache | ||
|
||
before_install: | ||
- composer self-update | ||
|
||
install: | ||
- composer install --prefer-dist | ||
matrix: | ||
include: | ||
- php: 7.4 | ||
env: WP_VERSION=latest | ||
- php: 7.4 | ||
env: WP_VERSION=5.4.2 | ||
- php: 7.2 | ||
env: WP_VERSION=latest | ||
- php: 7.2 | ||
env: WP_VERSION=5.4.2 | ||
- php: 7.0 | ||
env: WP_VERSION=latest | ||
- php: 7.0 | ||
env: WP_VERSION=5.4.2 | ||
|
||
before_script: | ||
- export PATH="$HOME/.composer/vendor/bin:$PATH" | ||
- | | ||
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then | ||
composer global require "phpunit/phpunit=5.7.*" | ||
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then | ||
phpenv config-rm xdebug.ini | ||
else | ||
composer global require "phpunit/phpunit=4.8.*" | ||
echo "xdebug.ini does not exist" | ||
fi | ||
- | | ||
if [[ ! -z "$WP_VERSION" ]] ; then | ||
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION | ||
composer global require "phpunit/phpunit=4.8.*|5.7.*" | ||
fi | ||
- | | ||
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then | ||
composer global require wp-coding-standards/wpcs | ||
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs | ||
fi | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "Travis CI" | ||
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION | ||
script: | ||
- | | ||
if [[ ! -z "$WP_VERSION" ]] ; then | ||
phpunit | ||
WP_MULTISITE=1 phpunit | ||
fi | ||
after_script: | ||
- ./bin/codeclimate.sh | ||
|
||
addons: | ||
codeclimate: | ||
repo_token: CODECLIMATE_REPO_TOKEN | ||
- | | ||
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then | ||
phpcs | ||
fi |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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