File tree Expand file tree Collapse file tree 1 file changed +16
-13
lines changed
Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -81,19 +81,22 @@ before_script:
8181 composer install
8282 cd ..
8383 fi
84- - PLUGIN_SLUG=$(basename $(pwd))
85- - export WP_DEVELOP_DIR=/tmp/wordpress/
86- - git clone --depth=50 --branch="$WP_VERSION" git://develop.git.wordpress.org/ /tmp/wordpress
87- - cd ..
88- - cp -r "$PLUGIN_SLUG" "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
89- - cd /tmp/wordpress/
90- - cp wp-tests-config-sample.php wp-tests-config.php
91- - sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
92- - sed -i "s/yourusernamehere/travis/" wp-tests-config.php
93- - sed -i "s/yourpasswordhere//" wp-tests-config.php
94- - mysql -e "CREATE DATABASE wordpress_tests;" -uroot
95- - cd "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
96- - phpenv rehash
84+ - |
85+ if [[ "$NPM_TESTS" != "1" ]]; then
86+ PLUGIN_SLUG=$(basename $(pwd))
87+ export WP_DEVELOP_DIR=/tmp/wordpress/
88+ git clone --depth=50 --branch="$WP_VERSION" git://develop.git.wordpress.org/ /tmp/wordpress
89+ cd ..
90+ cp -r "$PLUGIN_SLUG" "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
91+ cd /tmp/wordpress/
92+ cp wp-tests-config-sample.php wp-tests-config.php
93+ sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
94+ sed -i "s/yourusernamehere/travis/" wp-tests-config.php
95+ sed -i "s/yourpasswordhere//" wp-tests-config.php
96+ mysql -e "CREATE DATABASE wordpress_tests;" -uroot
97+ cd "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
98+ phpenv rehash
99+ fi
97100script :
98101 - |
99102 if [[ "$NPM_TESTS" == "1" ]]; then
You can’t perform that action at this time.
0 commit comments