Skip to content

Commit cdda991

Browse files
authored
Merge pull request #27 from wojsmol/tov2
Move command over to new v2 structure
2 parents f49b9ab + a7c4021 commit cdda991

File tree

16 files changed

+121
-2173
lines changed

16 files changed

+121
-2173
lines changed

circle.yml renamed to .circleci/config.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,31 @@ 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_HOST: 127.0.0.1
10+
- image: circleci/mysql:5.7
11+
environment:
12+
MYSQL_USER: wp_cli_test
13+
MYSQL_PASSWORD: password1
14+
MYSQL_DATABASE: wp_cli_test
915
steps:
1016
- checkout
1117
- run: |
1218
sudo sh -c "printf '\ndeb http://ftp.us.debian.org/debian sid main\n' >> /etc/apt/sources.list"
1319
sudo apt-get update
1420
sudo docker-php-ext-install mysqli
15-
sudo apt-get install mysql-client-5.7
21+
sudo apt-get install -y mysql-client-5.7
1622
- run: |
1723
echo -e "memory_limit = 1024M" | sudo tee /usr/local/etc/php/php.ini > /dev/null
1824
- run: |
19-
composer require wp-cli/wp-cli:dev-master
2025
composer install
21-
bash bin/install-package-tests.sh
26+
composer prepare-tests
2227
- run: |
2328
echo 'export PATH=$HOME/wp-cli/package-tests/vendor/bin:$PATH' >> $BASH_ENV
2429
source $BASH_ENV
2530
- run: |
2631
composer validate
27-
WP_VERSION=latest bash bin/test.sh
32+
WP_VERSION=latest composer behat
2833
rm -rf '/tmp/wp-cli-test core-download-cache'
29-
WP_VERSION=trunk bash bin/test.sh
34+
WP_VERSION=trunk composer behat

bin/install-package-tests.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

bin/test.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

composer.json

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "wp-cli/dist-archive-command",
3-
"description": "Create a distribution .zip or .tar.gz based on a plugin or theme's .distignore file.",
43
"type": "wp-cli-package",
4+
"description": "Create a distribution .zip or .tar.gz based on a plugin or theme's .distignore file.",
55
"homepage": "https://runcommand.io/wp/dist-archive/",
66
"license": "MIT",
77
"authors": [
@@ -11,20 +11,41 @@
1111
"homepage": "https://runcommand.io"
1212
}
1313
],
14-
"minimum-stability": "dev",
15-
"autoload": {
16-
"psr-4": {
17-
"": "src/"
18-
},
19-
"files": [ "dist-archive-command.php" ]
14+
"require": {
15+
"php": ">=5.4",
16+
"wp-cli/wp-cli": "^2"
2017
},
21-
"require": {},
2218
"require-dev": {
23-
"behat/behat": "~2.5"
19+
"behat/behat": "~2.5",
20+
"wp-cli/wp-cli-tests": "^2",
21+
"wp-cli/scaffold-command": "^2",
22+
"wp-cli/extension-command": "^2"
2423
},
2524
"extra": {
2625
"commands": [
2726
"dist-archive"
2827
]
28+
},
29+
"autoload": {
30+
"psr-4": {
31+
"": "src/"
32+
},
33+
"files": [
34+
"dist-archive-command.php"
35+
]
36+
},
37+
"minimum-stability": "dev",
38+
"scripts": {
39+
"behat": "run-behat-tests",
40+
"lint": "run-linter-tests",
41+
"phpcs": "run-phpcs-tests",
42+
"phpunit": "run-php-unit-tests",
43+
"prepare-tests": "install-package-tests",
44+
"test": [
45+
"@lint",
46+
"@phpcs",
47+
"@phpunit",
48+
"@behat"
49+
]
2950
}
3051
}

0 commit comments

Comments
 (0)