wordpress-activitypub/.travis.yml

100 lines
3.1 KiB
YAML
Raw Normal View History

2018-11-05 22:20:20 +01:00
sudo: false
dist: trusty
2018-09-24 20:53:23 +02:00
language: php
notifications:
email:
on_success: never
on_failure: change
2018-11-05 22:20:20 +01:00
cache:
directories:
2018-11-06 11:50:42 +01:00
- vendor
- "$HOME/.composer/cache"
after_success: bash bin/deploy.sh
2018-09-24 20:53:23 +02:00
env:
matrix:
2018-11-05 22:20:20 +01:00
- WP_VERSION=latest WP_MULTISITE=0
2018-09-24 20:53:23 +02:00
global:
2018-11-05 22:20:20 +01:00
- WP_TRAVISCI=travis:phpunit
- SVN_REPO: https://plugins.svn.wordpress.org/activitypub/
- GH_REF: https://github.com/pfefferle/wordpress-activitypub.git
- secure: "TFXc9CK6cG4Qpwm0sAhA0nEwMBfKKTdp3YN+rVV8KZrSmUDGw8QRlnFAxwWVG9yR1+TBVSS3Rrm38iRU8mvXkl5Vy6/HySqDF2QOO/gqhDZRpgCOq0mhxfzSc+tx2gGXbkRQw+eXt02p6VIHDi+bfll2rdvsE2XxkVgjvYJ+OMnfiqnESwac2+/rxii8qAvQwGnH/Cx7mpSFmt5KmRkR0XL05b9NEV+YkUpSQfSMx45IR2MZKlKAALTulDFIXvcwRMHSydgH8RoLDOioajgUzgFv1vBOWbCvdoHVvrNk2phtYgJ1yvOsMdKeb+Y5ZStag1HeKhZrzFMWJabe63N5Yukzo8gzU6doAPYaJ4CX6KaEEJoQyzxd5IUXZThNcnKStRVJbWngG850ROVCMg8rQYBQXr9HfeHMKGHCXzdXHc1zc13B5ycTL6pc0vWWys16Mdu8ivaPfk7qdnRZs2mpMeYZc4FoRy/xqavcyZX7kGnlONVcgoB4lP5eEQzu+wCWyjXcl4wrQfhCFCrS86jp1oLVUAS9GemPJRwVTWogEg+Rr5iMbWv6ZGh3F8fe5SEEAtThe8W9/hDC7NiZrbdA8hTyccRd91E7EEdCoZrTgc9VjKVkjxLjKHmocruevQQjafda5xsjRRZakAham9r9Rmfk4SH/4KBbWsFJlbHXZjE="
2018-09-24 20:53:23 +02:00
matrix:
include:
2020-09-21 13:35:40 +02:00
- php: nightly
2020-05-14 18:06:06 +02:00
- php: 7.4
2019-06-03 17:33:15 +02:00
- php: 7.3
2018-11-05 22:20:20 +01:00
- php: 7.2
- php: 7.1
- php: 7.0
- php: 5.6
- php: 5.6
env: WP_PLUGIN_DEPLOY=1
2018-09-24 20:53:23 +02:00
before_script:
2018-11-05 22:20:20 +01:00
- |
# 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
2020-09-21 13:35:40 +02:00
7.4|7.3|7.2|7.1|7.0|nightly)
2018-11-05 22:20:20 +01:00
echo "Using PHPUnit 6.x"
composer global require "phpunit/phpunit:^6"
;;
2020-09-21 13:29:39 +02:00
5.6)
echo "Using PHPUnit 5.x"
composer global require "phpunit/phpunit:^5"
2018-11-05 22:20:20 +01:00
;;
*)
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
2018-11-05 22:07:12 +01:00
before_install:
2018-11-05 22:20:20 +01:00
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
2018-11-06 11:50:42 +01:00
if [[ ! -z "$WP_VERSION" ]] ; then
set -e
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
set +e
fi
2018-11-05 22:07:12 +01:00
script:
2018-11-06 11:50:42 +01:00
- |
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