mirror of
https://fast.feibisi.com/https://github.com/wp-cli/scaffold-command.git
synced 2025-10-03 16:51:08 +08:00
Require at least WP 4.5 readme; circle 2 fixes.
This commit is contained in:
parent
43f55bdce4
commit
e87d5966ab
5 changed files with 72 additions and 29 deletions
|
@ -38,6 +38,7 @@ Feature: Scaffold plugin unit tests
|
|||
And the {PLUGIN_DIR}/hello-world/phpunit.xml.dist file should exist
|
||||
And the {PLUGIN_DIR}/hello-world/phpcs.xml.dist file should exist
|
||||
And the {PLUGIN_DIR}/hello-world/circle.yml file should not exist
|
||||
And the {PLUGIN_DIR}/hello-world/.circleci directory should not exist
|
||||
And the {PLUGIN_DIR}/hello-world/.gitlab-ci.yml file should not exist
|
||||
And the {PLUGIN_DIR}/hello-world/.travis.yml file should contain:
|
||||
"""
|
||||
|
@ -61,7 +62,7 @@ Feature: Scaffold plugin unit tests
|
|||
- php: 7.0
|
||||
env: WP_VERSION=latest
|
||||
- php: 5.6
|
||||
env: WP_VERSION=4.4
|
||||
env: WP_VERSION=4.5
|
||||
- php: 5.6
|
||||
env: WP_VERSION=latest
|
||||
- php: 5.6
|
||||
|
@ -85,9 +86,22 @@ Feature: Scaffold plugin unit tests
|
|||
When I run `wp plugin path hello-world --dir`
|
||||
Then save STDOUT as {PLUGIN_DIR}
|
||||
And the {PLUGIN_DIR}/.travis.yml file should not exist
|
||||
And the {PLUGIN_DIR}/circle.yml file should contain:
|
||||
And the {PLUGIN_DIR}/circle.yml file should not exist
|
||||
And the {PLUGIN_DIR}/.circleci/config.yml file should contain:
|
||||
"""
|
||||
version: 5.6.22
|
||||
version: 2
|
||||
"""
|
||||
And the {PLUGIN_DIR}/.circleci/config.yml file should contain:
|
||||
"""
|
||||
php56-build
|
||||
"""
|
||||
And the {PLUGIN_DIR}/.circleci/config.yml file should contain:
|
||||
"""
|
||||
php70-build
|
||||
"""
|
||||
And the {PLUGIN_DIR}/.circleci/config.yml file should contain:
|
||||
"""
|
||||
php71-build
|
||||
"""
|
||||
|
||||
Scenario: Scaffold plugin tests with Circle as the provider, part two
|
||||
|
@ -100,27 +114,28 @@ Feature: Scaffold plugin unit tests
|
|||
When I run `wp scaffold plugin-tests hello-world --ci=circle`
|
||||
Then STDOUT should not be empty
|
||||
And the {PLUGIN_DIR}/.travis.yml file should not exist
|
||||
And the {PLUGIN_DIR}/circle.yml file should contain:
|
||||
And the {PLUGIN_DIR}/circle.yml file should not exist
|
||||
And the {PLUGIN_DIR}/.circleci/config.yml file should contain:
|
||||
"""
|
||||
version: 5.6.22
|
||||
version: 2
|
||||
"""
|
||||
And the {PLUGIN_DIR}/circle.yml file should contain:
|
||||
And the {PLUGIN_DIR}/.circleci/config.yml file should contain:
|
||||
"""
|
||||
- |
|
||||
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
|
||||
bash bin/install-wp-tests.sh wordpress_test ubuntu '' 127.0.0.1 4.4
|
||||
phpunit
|
||||
WP_MULTISITE=1 phpunit
|
||||
- |
|
||||
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
|
||||
bash bin/install-wp-tests.sh wordpress_test ubuntu '' 127.0.0.1 latest
|
||||
phpunit
|
||||
WP_MULTISITE=1 phpunit
|
||||
- |
|
||||
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
|
||||
bash bin/install-wp-tests.sh wordpress_test ubuntu '' 127.0.0.1 trunk
|
||||
phpunit
|
||||
WP_MULTISITE=1 phpunit
|
||||
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
|
||||
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 4.5 $SKIP_DB_CREATE
|
||||
phpunit
|
||||
WP_MULTISITE=1 phpunit
|
||||
SKIP_DB_CREATE=true
|
||||
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
|
||||
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest $SKIP_DB_CREATE
|
||||
phpunit
|
||||
WP_MULTISITE=1 phpunit
|
||||
SKIP_DB_CREATE=true
|
||||
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
|
||||
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 trunk $SKIP_DB_CREATE
|
||||
phpunit
|
||||
WP_MULTISITE=1 phpunit
|
||||
SKIP_DB_CREATE=true
|
||||
"""
|
||||
|
||||
Scenario: Scaffold plugin tests with Gitlab as the provider
|
||||
|
|
|
@ -35,6 +35,7 @@ Feature: Scaffold theme unit tests
|
|||
And the {THEME_DIR}/p2child/phpunit.xml.dist file should exist
|
||||
And the {THEME_DIR}/p2child/phpcs.xml.dist file should exist
|
||||
And the {THEME_DIR}/p2child/circle.yml file should not exist
|
||||
And the {THEME_DIR}/p2child/.circleci directory should not exist
|
||||
And the {THEME_DIR}/p2child/.gitlab-ci.yml file should not exist
|
||||
And the {THEME_DIR}/p2child/.travis.yml file should contain:
|
||||
"""
|
||||
|
@ -124,9 +125,22 @@ Feature: Scaffold theme unit tests
|
|||
When I run `wp scaffold theme-tests p2child --ci=circle`
|
||||
Then STDOUT should not be empty
|
||||
And the {THEME_DIR}/p2child/.travis.yml file should not exist
|
||||
And the {THEME_DIR}/p2child/circle.yml file should contain:
|
||||
And the {THEME_DIR}/p2child/circle.yml file should not exist
|
||||
And the {THEME_DIR}/p2child/.circleci/config.yml file should contain:
|
||||
"""
|
||||
version: 5.6.22
|
||||
version: 2
|
||||
"""
|
||||
And the {THEME_DIR}/p2child/.circleci/config.yml file should contain:
|
||||
"""
|
||||
php56-build
|
||||
"""
|
||||
And the {THEME_DIR}/p2child/.circleci/config.yml file should contain:
|
||||
"""
|
||||
php70-build
|
||||
"""
|
||||
And the {THEME_DIR}/p2child/.circleci/config.yml file should contain:
|
||||
"""
|
||||
php71-build
|
||||
"""
|
||||
|
||||
Scenario: Scaffold theme tests with Gitlab as the provider
|
||||
|
|
|
@ -452,7 +452,7 @@ Feature: WordPress code scaffolding
|
|||
- php: 7.0
|
||||
env: WP_VERSION=latest
|
||||
- php: 5.6
|
||||
env: WP_VERSION=4.4
|
||||
env: WP_VERSION=4.5
|
||||
- php: 5.6
|
||||
env: WP_VERSION=latest
|
||||
- php: 5.6
|
||||
|
|
|
@ -24,7 +24,11 @@ jobs:
|
|||
source /home/circleci/.bashrc
|
||||
- run:
|
||||
name: "Install Dependencies"
|
||||
command: sudo apt-get update && sudo apt-get install subversion
|
||||
command: |
|
||||
sudo apt-get update && sudo apt-get install subversion
|
||||
sudo docker-php-ext-install mysqli
|
||||
sudo sh -c "printf '\ndeb http://ftp.us.debian.org/debian sid main\n' >> /etc/apt/sources.list"
|
||||
sudo apt-get update && sudo apt-get install mysql-client-5.7
|
||||
- run:
|
||||
name: "Run Tests"
|
||||
command: |
|
||||
|
@ -32,11 +36,13 @@ jobs:
|
|||
composer global require wp-coding-standards/wpcs
|
||||
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
|
||||
phpcs
|
||||
SKIP_DB_CREATE=false
|
||||
{{#wp_versions_to_test}}
|
||||
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
|
||||
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 {{.}}
|
||||
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 {{.}} $SKIP_DB_CREATE
|
||||
phpunit
|
||||
WP_MULTISITE=1 phpunit
|
||||
SKIP_DB_CREATE=true
|
||||
{{/wp_versions_to_test}}
|
||||
|
||||
php70-build:
|
||||
|
@ -55,7 +61,11 @@ jobs:
|
|||
source /home/circleci/.bashrc
|
||||
- run:
|
||||
name: "Install Dependencies"
|
||||
command: sudo apt-get update && sudo apt-get install subversion
|
||||
command: |
|
||||
sudo apt-get update && sudo apt-get install subversion
|
||||
sudo docker-php-ext-install mysqli
|
||||
sudo sh -c "printf '\ndeb http://ftp.us.debian.org/debian sid main\n' >> /etc/apt/sources.list"
|
||||
sudo apt-get update && sudo apt-get install mysql-client-5.7
|
||||
- run:
|
||||
name: "Run Tests"
|
||||
command: |
|
||||
|
@ -84,7 +94,11 @@ jobs:
|
|||
source /home/circleci/.bashrc
|
||||
- run:
|
||||
name: "Install Dependencies"
|
||||
command: sudo apt-get update && sudo apt-get install subversion
|
||||
command: |
|
||||
sudo apt-get update && sudo apt-get install subversion
|
||||
sudo docker-php-ext-install mysqli
|
||||
sudo sh -c "printf '\ndeb http://ftp.us.debian.org/debian sid main\n' >> /etc/apt/sources.list"
|
||||
sudo apt-get update && sudo apt-get install mysql-client-5.7
|
||||
- run:
|
||||
name: "Run Tests"
|
||||
command: |
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Contributors: (this should be a list of wordpress.org userid's)
|
||||
Donate link: https://example.com/
|
||||
Tags: comments, spam
|
||||
Requires at least: 4.4
|
||||
Requires at least: 4.5
|
||||
Tested up to: {{plugin_tested_up_to}}
|
||||
Stable tag: 0.1.0
|
||||
License: GPLv2 or later
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue