File tree Expand file tree Collapse file tree 4 files changed +21
-40
lines changed Expand file tree Collapse file tree 4 files changed +21
-40
lines changed Original file line number Diff line number Diff line change 17
17
18
18
env :
19
19
global :
20
- - WP_CLI_BIN_DIR=/tmp/wp-cli-phar
20
+ - PATH="$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
21
+ - WP_CLI_BIN_DIR="$TRAVIS_BUILD_DIR/vendor/bin"
21
22
22
23
matrix :
23
24
include :
@@ -32,9 +33,15 @@ matrix:
32
33
- php : 5.3
33
34
env : WP_VERSION=latest
34
35
35
- before_script :
36
+ before_install :
36
37
- phpenv config-rm xdebug.ini
37
- - composer validate
38
+
39
+ install :
40
+ - composer install
38
41
- bash bin/install-package-tests.sh
39
42
40
- script : ./vendor/bin/behat --format progress --strict
43
+ before_script :
44
+ - composer validate
45
+
46
+ script :
47
+ - behat --format progress --strict
Original file line number Diff line number Diff line change 2
2
3
3
set -ex
4
4
5
- WP_CLI_BIN_DIR=${WP_CLI_BIN_DIR-/ tmp/ wp-cli-phar}
6
-
7
- PACKAGE_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " /../ && pwd ) "
8
-
9
- download () {
10
- if [ ` which curl` ]; then
11
- curl -s " $1 " > " $2 " ;
12
- elif [ ` which wget` ]; then
13
- wget -nv -O " $2 " " $1 "
14
- fi
15
- }
16
-
17
- install_wp_cli () {
18
-
19
- # the Behat test suite will pick up the executable found in $WP_CLI_BIN_DIR
20
- mkdir -p $WP_CLI_BIN_DIR
21
- download https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar $WP_CLI_BIN_DIR /wp
22
- chmod +x $WP_CLI_BIN_DIR /wp
23
-
24
- }
25
-
26
- download_behat () {
27
-
28
- cd $PACKAGE_DIR
29
- composer require --dev behat/behat=' ~2.5'
30
-
31
- }
32
-
33
5
install_db () {
34
6
mysql -e ' CREATE DATABASE IF NOT EXISTS wp_cli_test;' -uroot
35
7
mysql -e ' GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost" IDENTIFIED BY "password1"' -uroot
36
8
}
37
9
38
- install_wp_cli
39
- download_behat
40
10
install_db
Original file line number Diff line number Diff line change 2
2
php :
3
3
version : 5.6.22
4
4
environment :
5
- WP_CLI_BIN_DIR : /tmp/wp-cli-phar
5
+ PATH : " $HOME/$CIRCLE_PROJECT_REPONAME/vendor/bin:$PATH"
6
+ WP_CLI_BIN_DIR : " $HOME/$CIRCLE_PROJECT_REPONAME/vendor/bin"
6
7
7
8
dependencies :
8
9
cache_directories :
@@ -14,13 +15,14 @@ dependencies:
14
15
- echo "" > /opt/circleci/php/$(phpenv global)/etc/conf.d/xdebug.ini
15
16
# Increase memory limit
16
17
- echo "memory_limit = 512M" > /opt/circleci/php/$(phpenv global)/etc/conf.d/memory.ini
17
-
18
+ override :
19
+ - composer install
20
+ - bash bin/install-package-tests.sh
18
21
19
22
test :
20
23
pre :
21
24
- composer validate
22
- - bash bin/install-package-tests.sh
23
25
override :
24
- - WP_VERSION=latest ./vendor/bin/ behat --format progress --strict
26
+ - WP_VERSION=latest behat --format progress --strict
25
27
- rm -rf '/tmp/wp-cli-test core-download-cache'
26
- - WP_VERSION=trunk ./vendor/bin/ behat --format progress --strict
28
+ - WP_VERSION=trunk behat --format progress --strict
Original file line number Diff line number Diff line change 18
18
"autoload" : {
19
19
"files" : [ " command.php" ]
20
20
},
21
- "require" : {},
21
+ "require" : {
22
+ "wp-cli/wp-cli" : " ^1.0.0"
23
+ },
22
24
"require-dev" : {
23
25
"behat/behat" : " ~2.5"
24
26
},
You can’t perform that action at this time.
0 commit comments