diff --git a/features/scaffold-plugin-tests.feature b/features/scaffold-plugin-tests.feature index caa5b570..a4bfa5eb 100644 --- a/features/scaffold-plugin-tests.feature +++ b/features/scaffold-plugin-tests.feature @@ -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 diff --git a/features/scaffold-theme-tests.feature b/features/scaffold-theme-tests.feature index 80cc91a8..287d9513 100644 --- a/features/scaffold-theme-tests.feature +++ b/features/scaffold-theme-tests.feature @@ -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 diff --git a/features/scaffold.feature b/features/scaffold.feature index e308c5ef..dad21312 100644 --- a/features/scaffold.feature +++ b/features/scaffold.feature @@ -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 diff --git a/templates/plugin-circle.mustache b/templates/plugin-circle.mustache index 9dc6c82a..b0de043e 100644 --- a/templates/plugin-circle.mustache +++ b/templates/plugin-circle.mustache @@ -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: | diff --git a/templates/plugin-readme.mustache b/templates/plugin-readme.mustache index d7966408..dc9fb00d 100644 --- a/templates/plugin-readme.mustache +++ b/templates/plugin-readme.mustache @@ -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