# Travis CI configuration file. language: php # 5.3 runs first so that we can fail fast on the codesniff pass (see below). php: - 5.3 - 5.2 - 5.4 - 5.5 - 5.6 env: - TRAVISCI_RUN=codesniff - TRAVISCI_RUN=phpunit WP_VERSION=latest WP_MULTISITE=0 - TRAVISCI_RUN=phpunit WP_VERSION=latest WP_MULTISITE=1 - TRAVISCI_RUN=phpunit WP_VERSION=3.9 WP_MULTISITE=0 - TRAVISCI_RUN=phpunit WP_VERSION=3.9 WP_MULTISITE=1 - TRAVISCI_RUN=phpunit WP_VERSION=3.8 WP_MULTISITE=0 - TRAVISCI_RUN=phpunit WP_VERSION=3.8 WP_MULTISITE=1 matrix: include: # Only run HHVM against the latest for now. - php: hhvm env: TRAVISCI_RUN=phpunit WP_VERSION=latest WP_MULTISITE=0 - php: hhvm env: TRAVISCI_RUN=phpunit WP_VERSION=latest WP_MULTISITE=1 exclude: # The codesniff pass only needs to be run once, I chose PHP 5.3, since WPCS requires it. - php: 5.2 env: TRAVISCI_RUN=codesniff - php: 5.4 env: TRAVISCI_RUN=codesniff - php: 5.5 env: TRAVISCI_RUN=codesniff - php: 5.6 env: TRAVISCI_RUN=codesniff allow_failures: - php: hhvm fast_finish: true before_install: - export WP_TESTS_DIR=/tmp/wordpress-tests/ - export PLUGIN_DIR=$(pwd) - export PLUGIN_SLUG=$(basename $(pwd) | sed 's/^wp-//') - export PHPCS_DIR=/tmp/phpcs - export PHPCS_GITHUB_SRC=squizlabs/PHP_CodeSniffer - export PHPCS_GIT_TREE=master - export PHPCS_IGNORE='vendor/*,bin/*' - export WPCS_DIR=/tmp/wpcs - export WPCS_GITHUB_SRC=WordPress-Coding-Standards/WordPress-Coding-Standards - export WPCS_GIT_TREE=master - export WPCS_STANDARD=$(if [ -e phpcs.ruleset.xml ]; then echo phpcs.ruleset.xml; else echo WordPress; fi) - if [ -e .ci-env.sh ]; then source .ci-env.sh; fi before_script: - > if [ $TRAVISCI_RUN == phpunit ]; then setup-phpunit fi - > if [ $TRAVISCI_RUN == codesniff ]; then setup-codesniff fi script: - codesniff-php-syntax - codesniff-phpcs - codesniff-jshint - phpunit-basic - phpunit-uninstall - phpunit-ajax - phpunit-ms-network - phpunit-ms-network-uninstall - phpunit-ms-network-ajax after_script: - if [ -e .coveralls.yml ]; then php vendor/bin/coveralls; fi