Skip to content

Commit dadade7

Browse files
authored
Merge pull request #151 from wojsmol/tov2
Move command over to new v2 structure
2 parents ac6c1c2 + b3b64a1 commit dadade7

21 files changed

+336
-2116
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ node_modules/
55
vendor/
66
*.zip
77
*.tar.gz
8+
*.log

.travis.yml

+44-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
sudo: false
2+
dist: trusty
23

34
language: php
5+
php: 7.2
46

57
notifications:
68
email:
@@ -13,28 +15,56 @@ branches:
1315

1416
cache:
1517
directories:
16-
- vendor
1718
- $HOME/.composer/cache
1819

1920
env:
2021
global:
21-
- WP_CLI_BIN_DIR=/tmp/wp-cli-phar
22+
- PATH="$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
23+
- WP_CLI_BIN_DIR="$TRAVIS_BUILD_DIR/vendor/bin"
2224

23-
matrix:
25+
before_install:
26+
- |
27+
# Remove Xdebug for a huge performance increase:
28+
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
29+
phpenv config-rm xdebug.ini
30+
else
31+
echo "xdebug.ini does not exist"
32+
fi
33+
- |
34+
# Raise PHP memory limit to 2048MB
35+
echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
36+
- composer validate
37+
38+
install:
39+
- composer install
40+
- composer prepare-tests
41+
42+
script:
43+
- composer phpunit
44+
- composer behat || composer behat-rerun
45+
46+
jobs:
2447
include:
25-
- php: 7.1
48+
- stage: sniff
49+
script:
50+
- composer lint
51+
- composer phpcs
52+
env: BUILD=sniff
53+
- stage: test
54+
php: 7.2
2655
env: WP_VERSION=latest
27-
- php: 7.0
56+
- stage: test
57+
php: 7.1
2858
env: WP_VERSION=latest
29-
- php: 5.6
59+
- stage: test
60+
php: 7.0
3061
env: WP_VERSION=latest
31-
- php: 5.6
62+
- stage: test
63+
php: 5.6
64+
env: WP_VERSION=latest
65+
- stage: test
66+
php: 5.6
3267
env: WP_VERSION=trunk
33-
- php: 5.4
68+
- stage: test
69+
php: 5.4
3470
env: WP_VERSION=latest
35-
36-
before_script:
37-
- composer validate
38-
- bash bin/install-package-tests.sh
39-
40-
script: ./bin/test.sh

bin/install-package-tests.sh

-40
This file was deleted.

bin/test.sh

-8
This file was deleted.

composer.json

+29-9
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
{
22
"name": "wp-cli/profile-command",
3-
"description": "Quickly identify what's slow with WordPress.",
43
"type": "wp-cli-package",
4+
"description": "Quickly identify what's slow with WordPress.",
55
"homepage": "https://runcommand.io/wp/profile/",
66
"license": "MIT",
77
"authors": [],
8-
"minimum-stability": "dev",
9-
"prefer-stable": true,
10-
"autoload": {
11-
"files": [ "command.php" ]
12-
},
138
"require": {
149
"php": ">=5.4",
15-
"wp-cli/wp-cli": "*"
10+
"wp-cli/wp-cli": "^2"
1611
},
1712
"require-dev": {
18-
"behat/behat": "~2.5"
13+
"wp-cli/wp-cli-tests": "^2.0.7"
14+
},
15+
"config": {
16+
"process-timeout": 7200,
17+
"sort-packages": true
1918
},
2019
"extra": {
2120
"branch-alias": {
22-
"dev-master": "1.x-dev"
21+
"dev-master": "2.x-dev"
2322
},
2423
"commands": [
2524
"profile stage",
@@ -38,5 +37,26 @@
3837
"post": "bin/readme/overview-body.md"
3938
}
4039
}
40+
},
41+
"autoload": {
42+
"files": [
43+
"command.php"
44+
]
45+
},
46+
"minimum-stability": "dev",
47+
"prefer-stable": true,
48+
"scripts": {
49+
"behat": "run-behat-tests",
50+
"behat-rerun": "rerun-behat-tests",
51+
"lint": "run-linter-tests",
52+
"phpcs": "run-phpcs-tests",
53+
"phpunit": "run-php-unit-tests",
54+
"prepare-tests": "install-package-tests",
55+
"test": [
56+
"@lint",
57+
"@phpcs",
58+
"@phpunit",
59+
"@behat"
60+
]
4161
}
4262
}

0 commit comments

Comments
 (0)