before_script: ./bin/ci/prepare.sh
-script: ./bin/ci/build.sh
+script: ./bin/ci/test.sh
notifications:
email:
+++ /dev/null
-#!/bin/bash
-
-set -ex
-
-# Run the unit tests
-phpunit
-
-# Create the Phar file
-mkdir -p $WP_CLI_BIN_DIR
-php -dphar.readonly=0 utils/make-phar.php wp-cli.phar --quiet
-mv wp-cli.phar $WP_CLI_BIN_DIR/wp
-chmod +x $WP_CLI_BIN_DIR/wp
-
-# Run the functional tests
-php behat.phar --format progress
set -ex
-# install Behat
-curl http://behat.org/downloads/behat.phar > behat.phar
-
-# install dependencies
composer install --no-interaction --prefer-source
-# set up WP install
+# the Behat test suite will pick up the executable found in $WP_CLI_BIN_DIR
+mkdir -p $WP_CLI_BIN_DIR
+php -dphar.readonly=0 utils/make-phar.php wp-cli.phar --quiet
+mv wp-cli.phar $WP_CLI_BIN_DIR/wp
+chmod +x $WP_CLI_BIN_DIR/wp
+
+# Travis CI doesn't come with Behat pre-installed
+curl http://behat.org/downloads/behat.phar > behat.phar
+
./bin/wp core download --version=$WP_VERSION --path=/tmp/wp-cli-test-core-download-cache/
-# set up database
mysql -e 'CREATE DATABASE wp_cli_test;' -uroot
mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost" IDENTIFIED BY "password1"' -uroot