Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bin/install-package-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
set -ex

install_db() {
mysql -e 'CREATE DATABASE IF NOT EXISTS wp_cli_test;' -uroot
mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost" IDENTIFIED BY "password1"' -uroot
mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test_scaffold.* TO "wp_cli_test"@"localhost" IDENTIFIED BY "password1"' -uroot
mysql -e 'CREATE DATABASE IF NOT EXISTS wp_cli_test;' -uroot -h 127.0.0.1
mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"127.0.0.1" IDENTIFIED BY "password1"' -uroot -h 127.0.0.1
mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test_scaffold.* TO "wp_cli_test"@"127.0.0.1" IDENTIFIED BY "password1"' -uroot -h 127.0.0.1
}

install_db
58 changes: 29 additions & 29 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
machine:
php:
version: 5.6.22
environment:
PATH: "$HOME/$CIRCLE_PROJECT_REPONAME/vendor/bin:$PATH"
WP_CLI_BIN_DIR: "$HOME/$CIRCLE_PROJECT_REPONAME/vendor/bin"

dependencies:
cache_directories:
- ~/.composer/cache
pre:
# Set the PHP timezone so that Behat does not fail.
- echo "date.timezone = 'US/Central'" > /opt/circleci/php/$(phpenv global)/etc/conf.d/wp-cli-timezone.ini
# Disable xdebug, which makes Composer slower.
- echo "" > /opt/circleci/php/$(phpenv global)/etc/conf.d/xdebug.ini
# Increase memory limit
- echo "memory_limit = 1024M" > /opt/circleci/php/$(phpenv global)/etc/conf.d/memory.ini
override:
- composer require wp-cli/wp-cli:dev-master
- composer install
- bash bin/install-package-tests.sh

test:
pre:
- composer validate
override:
- WP_VERSION=latest bash bin/test.sh
- rm -rf '/tmp/wp-cli-test core-download-cache'
- WP_VERSION=trunk bash bin/test.sh
version: 2
jobs:
build:
working_directory: ~/wp-cli/package-tests
parallelism: 1
docker:
- image: circleci/php:7.1
- image: circleci/mysql:5.6
steps:
- checkout
- run: |
sudo sh -c "printf '\ndeb http://ftp.us.debian.org/debian sid main\n' >> /etc/apt/sources.list"
sudo apt-get update
sudo docker-php-ext-install mysqli
sudo apt-get install mysql-client-5.7
- run: |
echo -e "memory_limit = 1024M" | sudo tee /usr/local/etc/php/php.ini > /dev/null
- run: |
composer require wp-cli/wp-cli:dev-master
composer install
bash bin/install-package-tests.sh
- run: |
echo 'export PATH=$HOME/wp-cli/package-tests/vendor/bin:$PATH' >> $BASH_ENV
source $BASH_ENV
- run: |
composer validate
WP_VERSION=latest bash bin/test.sh
rm -rf '/tmp/wp-cli-test core-download-cache'
WP_VERSION=trunk bash bin/test.sh