Skip to content

Commit 5f60800

Browse files
committed
configure Circle CI
1 parent 31c4808 commit 5f60800

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

circle.yml renamed to .circleci/config.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@ jobs:
44
working_directory: ~/wp-cli/package-tests
55
parallelism: 1
66
docker:
7-
- image: circleci/php:7.1
8-
- image: circleci/mysql:5.6
7+
- image: circleci/php:7.1-cli
8+
environment:
9+
MYSQL_DB: wp_cli_test_scaffold
10+
MYSQL_USER: wp_cli_test
11+
MYSQL_PASSWORD: password1
12+
- image: circleci/mysql:5.7
913
steps:
1014
- checkout
1115
- run: |
1216
sudo sh -c "printf '\ndeb http://ftp.us.debian.org/debian sid main\n' >> /etc/apt/sources.list"
1317
sudo apt-get update
1418
sudo docker-php-ext-install mysqli
15-
sudo apt-get install mysql-client-5.7
19+
sudo apt-get install -y mysql-client-5.7
1620
- run: |
1721
echo -e "memory_limit = 1024M" | sudo tee /usr/local/etc/php/php.ini > /dev/null
1822
- run: |
@@ -24,6 +28,6 @@ jobs:
2428
source $BASH_ENV
2529
- run: |
2630
composer validate
27-
WP_VERSION=latest bash bin/test.sh
31+
WP_VERSION=latest composer behat
2832
rm -rf '/tmp/wp-cli-test core-download-cache'
29-
WP_VERSION=trunk bash bin/test.sh
33+
WP_VERSION=trunk composer behat

bin/install-package-tests.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
install_db() {
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
9+
}
10+
11+
install_db

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"require-dev": {
1919
"behat/behat": "~2.5",
2020
"wp-cli/wp-cli-tests": "^2",
21-
"wp-cli/scaffold-command": "^2"
21+
"wp-cli/scaffold-command": "^2",
22+
"wp-cli/extension-command": "^2"
2223
},
2324
"extra": {
2425
"commands": [

0 commit comments

Comments
 (0)