Skip to content

Commit 612a8a9

Browse files
authored
Merge pull request wp-cli#49 from wojsmol/tov2
convert to v2
2 parents 6197477 + 348a567 commit 612a8a9

File tree

15 files changed

+142
-2051
lines changed

15 files changed

+142
-2051
lines changed

.travis.yml

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ sudo: false
22
dist: trusty
33

44
language: php
5+
php: 7.2
56

67
notifications:
78
email:
@@ -14,38 +15,59 @@ branches:
1415

1516
cache:
1617
directories:
17-
- vendor
1818
- $HOME/.composer/cache
1919

2020
env:
2121
global:
2222
- PATH="$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
2323
- WP_CLI_BIN_DIR="$TRAVIS_BUILD_DIR/vendor/bin"
2424

25-
matrix:
26-
include:
27-
- php: 7.1
28-
env: WP_VERSION=latest
29-
- php: 7.0
30-
env: WP_VERSION=latest
31-
- php: 5.6
32-
env: WP_VERSION=latest
33-
- php: 5.6
34-
env: WP_VERSION=trunk
35-
- php: 5.3
36-
dist: precise
37-
env: WP_VERSION=latest
38-
3925
before_install:
40-
- phpenv config-rm xdebug.ini
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
4137

4238
install:
43-
- composer require wp-cli/wp-cli:dev-master
4439
- composer install
45-
- bash bin/install-package-tests.sh
46-
47-
before_script:
48-
- composer validate
40+
- composer prepare-tests
4941

5042
script:
51-
- behat --format progress --strict
43+
- composer phpunit
44+
- composer behat
45+
46+
jobs:
47+
include:
48+
- stage: sniff
49+
script:
50+
- composer lint
51+
- composer phpcs
52+
env: BUILD=sniff
53+
- stage: test
54+
php: 7.2
55+
env: WP_VERSION=latest
56+
- stage: test
57+
php: 7.1
58+
env: WP_VERSION=latest
59+
- stage: test
60+
php: 7.0
61+
env: WP_VERSION=latest
62+
- stage: test
63+
php: 5.6
64+
env: WP_VERSION=latest
65+
- stage: test
66+
php: 5.6
67+
env: WP_VERSION=3.7.11
68+
- stage: test
69+
php: 5.6
70+
env: WP_VERSION=trunk
71+
- stage: test
72+
php: 5.4
73+
env: WP_VERSION=latest

bin/install-package-tests.sh

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

composer.json

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,32 @@
1212
"files": [ "find-command.php" ]
1313
},
1414
"require": {
15-
"wp-cli/wp-cli": "*"
15+
"php": ">=5.4",
16+
"wp-cli/wp-cli": "2"
1617
},
1718
"require-dev": {
18-
"behat/behat": "~2.5"
19+
"behat/behat": "~2.5",
20+
"wp-cli/wp-cli-tests": "2"
21+
},
22+
"config": {
23+
"platform": {
24+
"php": "5.4"
25+
},
26+
"process-timeout": 7200,
27+
"sort-packages": true
28+
},
29+
"scripts": {
30+
"lint": "run-linter-tests",
31+
"phpcs": "run-phpcs-tests",
32+
"phpunit": "run-php-unit-tests",
33+
"behat": "run-behat-tests",
34+
"prepare-tests": "install-package-tests",
35+
"test": [
36+
"@lint",
37+
"@phpcs",
38+
"@phpunit",
39+
"@behat"
40+
]
1941
},
2042
"extra": {
2143
"branch-alias": {

0 commit comments

Comments
 (0)