Skip to content

Commit 164662a

Browse files
authored
Merge pull request #177 from wp-cli/169-circle-v2
Update `circle.yml` to use its v2 API
2 parents 2204f3c + 05835f4 commit 164662a

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

bin/install-package-tests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
set -ex
44

55
install_db() {
6-
mysql -e 'CREATE DATABASE IF NOT EXISTS wp_cli_test;' -uroot
7-
mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost" IDENTIFIED BY "password1"' -uroot
8-
mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test_scaffold.* TO "wp_cli_test"@"localhost" IDENTIFIED BY "password1"' -uroot
6+
mysql -e 'CREATE DATABASE IF NOT EXISTS wp_cli_test;' -uroot -h 127.0.0.1
7+
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
8+
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
99
}
1010

1111
install_db

circle.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
machine:
2-
php:
3-
version: 5.6.22
4-
environment:
5-
PATH: "$HOME/$CIRCLE_PROJECT_REPONAME/vendor/bin:$PATH"
6-
WP_CLI_BIN_DIR: "$HOME/$CIRCLE_PROJECT_REPONAME/vendor/bin"
7-
8-
dependencies:
9-
cache_directories:
10-
- ~/.composer/cache
11-
pre:
12-
# Set the PHP timezone so that Behat does not fail.
13-
- echo "date.timezone = 'US/Central'" > /opt/circleci/php/$(phpenv global)/etc/conf.d/wp-cli-timezone.ini
14-
# Disable xdebug, which makes Composer slower.
15-
- echo "" > /opt/circleci/php/$(phpenv global)/etc/conf.d/xdebug.ini
16-
# Increase memory limit
17-
- echo "memory_limit = 1024M" > /opt/circleci/php/$(phpenv global)/etc/conf.d/memory.ini
18-
override:
19-
- composer require wp-cli/wp-cli:dev-master
20-
- composer install
21-
- bash bin/install-package-tests.sh
22-
23-
test:
24-
pre:
25-
- composer validate
26-
override:
27-
- WP_VERSION=latest bash bin/test.sh
28-
- rm -rf '/tmp/wp-cli-test core-download-cache'
29-
- WP_VERSION=trunk bash bin/test.sh
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: ~/wp-cli/package-tests
5+
parallelism: 1
6+
docker:
7+
- image: circleci/php:7.1
8+
- image: circleci/mysql:5.6
9+
steps:
10+
- checkout
11+
- run: |
12+
sudo sh -c "printf '\ndeb http://ftp.us.debian.org/debian sid main\n' >> /etc/apt/sources.list"
13+
sudo apt-get update
14+
sudo docker-php-ext-install mysqli
15+
sudo apt-get install mysql-client-5.7
16+
- run: |
17+
echo -e "memory_limit = 1024M" | sudo tee /usr/local/etc/php/php.ini > /dev/null
18+
- run: |
19+
composer require wp-cli/wp-cli:dev-master
20+
composer install
21+
bash bin/install-package-tests.sh
22+
- run: |
23+
echo 'export PATH=$HOME/wp-cli/package-tests/vendor/bin:$PATH' >> $BASH_ENV
24+
source $BASH_ENV
25+
- run: |
26+
composer validate
27+
WP_VERSION=latest bash bin/test.sh
28+
rm -rf '/tmp/wp-cli-test core-download-cache'
29+
WP_VERSION=trunk bash bin/test.sh

0 commit comments

Comments
 (0)