-
Notifications
You must be signed in to change notification settings - Fork 5
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 #19 from dshanske/fixes
Fixes
- Loading branch information
Showing
7 changed files
with
727 additions
and
257 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,38 +1,105 @@ | ||
sudo: false | ||
dist: trusty | ||
language: php | ||
|
||
notifications: | ||
on_success: never | ||
on_failure: change | ||
|
||
php: | ||
- 5.6 | ||
- 7.0 | ||
|
||
email: | ||
on_success: never | ||
on_failure: change | ||
cache: | ||
directories: | ||
- vendor | ||
- $HOME/.composer/cache | ||
after_success: curl -L https://raw.githubusercontent.com/miya0001/travis2wpplugin/master/deploy.sh | bash | ||
|
||
env: | ||
matrix: | ||
- WP_VERSION=latest WP_MULTISITE=0 | ||
- WP_VERSION=nightly WP_MULTISITE=0 | ||
|
||
- WP_VERSION=latest WP_MULTISITE=0 | ||
global: | ||
- SVN_REPO: https://plugins.svn.wordpress.org/indieweb-press-this/ | ||
- GH_REF: https://github.com/indieweb/wordpress-indieweb-press-this.git | ||
- secure: "WKTz/kN5Cyp48ffY6B/P1Gj5aSkTnJYy7HVxwoYqNsHhmC/Bqmfq6+JN5lRxCtBy7SnoA50v8DG5Cqk7UU9hJakYLU6ya6VRgif0rZyLM3curvB/BmS3Rta0VG6q/yOZCFM4+20MKLLELqUAhZmED4+/UWcdGofv1I0nbrMO6quJB7pV0cUdNMIUTVPwRZrGUElEkHjwk1YFam71taRUQe7C0gOK7NYvFwsAYGG4pWjzAV2FY6Cb7TnQsFTe95kMUQHO4iizbsY3tTsFixb5xeJwoo/b6ODrkxUSi1eKam5Y1gM4jEppnfkVPtUnERCAU+sW5tOYZA9xEpo6xNaUXOMQXyBt+Q1yG2nGHyMnQMRON01AxTB7nWCv/fs98BW63V9drPyrYaGuIX9RA42+kX/2L2er2viubmUfqoXCX5aHJ4/LWFWCJ7k9Bdp47n7TveXF0IrVhthpVYxn0nexMIh9F3+TEDZHPv3Rx6qdirERWAORvgNV7s1qYS1Tgjf3O4k8zNULZa70WkiOAk6G1PHDK4XUEl8WuZQfmninIp9hBMrysWhiw8CDZieGWMfPJtKexqbrnSyqKRJ9+xDewTO0v/u9DUfW/o9z4h04644QDSO9l2B0bsbakbCOdHJfRHNWRrfSOm5txPpkAiD0sMvdrak6lFVC4f4E60yVEog=" | ||
|
||
- WP_TRAVISCI=travis:phpunit | ||
- SVN_REPO: https://plugins.svn.wordpress.org/indieweb-press-this/ | ||
- GH_REF: https://github.com/indieweb/wordpress-indieweb-press-this.git | ||
- secure: "WKTz/kN5Cyp48ffY6B/P1Gj5aSkTnJYy7HVxwoYqNsHhmC/Bqmfq6+JN5lRxCtBy7SnoA50v8DG5Cqk7UU9hJakYLU6ya6VRgif0rZyLM3curvB/BmS3Rta0VG6q/yOZCFM4+20MKLLELqUAhZmED4+/UWcdGofv1I0nbr MO6quJB7pV0cUdNMIUTVPwRZrGUElEkHjwk1YFam71taRUQe7C0gOK7NYvFwsAYGG4pWjzAV2FY6Cb7TnQsFTe95kMUQHO4iizbsY3tTsFixb5xeJwoo/b6ODrkxUSi1eKam5Y1gM4jEppnfkVPtUnERCAU+sW5tOYZA9xEpo6xNaUXOMQXyB t+Q1yG2nGHyMnQMRON01AxTB7nWCv/fs98BW63V9drPyrYaGuIX9RA42+kX/2L2er2viubmUfqoXCX5aHJ4/LWFWCJ7k9Bdp47n7TveXF0IrVhthpVYxn0nexMIh9F3+TEDZHPv3Rx6qdirERWAORvgNV7s1qYS1Tgjf3O4k8zNULZa70WkiO Ak6G1PHDK4XUEl8WuZQfmninIp9hBMrysWhiw8CDZieGWMfPJtKexqbrnSyqKRJ9+xDewTO0v/u9DUfW/o9z4h04644QDSO9l2B0bsbakbCOdHJfRHNWRrfSOm5txPpkAiD0sMvdrak6lFVC4f4E60yVEog=" | ||
matrix: | ||
include: | ||
- php: 5.6 | ||
env: WP_VERSION=latest WP_MULTISITE=0 WP_PULUGIN_DEPLOY=1 | ||
|
||
- php: 7.2 | ||
- php: 7.1 | ||
- php: 7.0 | ||
- php: 5.6 | ||
- php: 5.6 | ||
env: WP_PULUGIN_DEPLOY=1 | ||
- php: 5.5 | ||
- php: 5.4 | ||
- php: 5.3 | ||
dist: precise | ||
before_script: | ||
- export PATH="$HOME/.composer/vendor/bin:$PATH" | ||
- | | ||
# Remove Xdebug for a huge performance increase: | ||
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then | ||
phpenv config-rm xdebug.ini | ||
else | ||
echo "xdebug.ini does not exist" | ||
fi | ||
- | | ||
# Export Composer's global bin dir to PATH: | ||
composer config --list --global | ||
export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }` | ||
- | | ||
# Install the specified version of PHPUnit depending on the PHP version: | ||
if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then | ||
case "$TRAVIS_PHP_VERSION" in | ||
7.2|7.1|7.0|nightly) | ||
echo "Using PHPUnit 6.x" | ||
composer global require "phpunit/phpunit:^6" | ||
;; | ||
5.6|5.5|5.4|5.3) | ||
echo "Using PHPUnit 4.x" | ||
composer global require "phpunit/phpunit:^4" | ||
;; | ||
5.2) | ||
# Do nothing, use default PHPUnit 3.6.x | ||
echo "Using default PHPUnit, hopefully 3.6" | ||
;; | ||
*) | ||
echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION" | ||
exit 1 | ||
;; | ||
esac | ||
fi | ||
if [[ "$WP_TRAVISCI" == "travis:phpcs" ]] ; then | ||
composer install | ||
fi | ||
- mysql --version | ||
- phpenv versions | ||
- php --version | ||
- php -m | ||
- which phpunit | ||
- phpunit --version | ||
- curl --version | ||
- grunt --version | ||
- git --version | ||
- svn --version | ||
- locale -a | ||
before_install: | ||
- export PATH="$HOME/.composer/vendor/bin:$PATH" | ||
- | | ||
if [[ ! -z "$WP_VERSION" ]] ; then | ||
set -e | ||
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION | ||
set +e | ||
fi | ||
script: | ||
- | | ||
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then | ||
composer global require "phpunit/phpunit=5.7.*" | ||
elif [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then | ||
composer global require "phpunit/phpunit=4.8.*" | ||
if [[ ! -z "$WP_VERSION" ]] ; then | ||
# Run the build because otherwise there will be a bunch of warnings about | ||
# failed `stat` calls from `filemtime()`. | ||
echo Running with the following versions: | ||
php -v | ||
phpunit --version | ||
# Run PHPUnit tests | ||
phpunit || exit 1 | ||
WP_MULTISITE=1 phpunit || exit 1 | ||
fi | ||
- | | ||
if [[ "$WP_TRAVISCI" == "travis:phpcs" ]] ; then | ||
./vendor/bin/phpcs -p -s -v -n --standard=./phpcs.ruleset.xml --extensions=php | ||
fi | ||
- bash bin/install-wp-tests.sh wordpress root '' localhost $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
Oops, something went wrong.