mirror of
https://fast.feibisi.com/https://github.com/wp-cli/scaffold-command.git
synced 2025-10-03 16:51:08 +08:00
Merge pull request #339 from ernilambar/197-update-bitbucket-ci
This commit is contained in:
commit
a27c3a7a02
3 changed files with 92 additions and 123 deletions
|
@ -172,42 +172,29 @@ Feature: Scaffold plugin unit tests
|
||||||
And the {PLUGIN_DIR}/bitbucket-pipelines.yml file should contain:
|
And the {PLUGIN_DIR}/bitbucket-pipelines.yml file should contain:
|
||||||
"""
|
"""
|
||||||
- step:
|
- step:
|
||||||
image: php:5.6
|
image: php:7.4
|
||||||
name: "PHP 5.6"
|
name: "PHP 7.4"
|
||||||
script:
|
script:
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
- docker-php-ext-install mysqli
|
- apt-get update && apt-get install -y subversion git zip libzip-dev --no-install-recommends
|
||||||
- apt-get update && apt-get install -y subversion --no-install-recommends
|
|
||||||
"""
|
"""
|
||||||
And the {PLUGIN_DIR}/bitbucket-pipelines.yml file should contain:
|
And the {PLUGIN_DIR}/bitbucket-pipelines.yml file should contain:
|
||||||
"""
|
"""
|
||||||
- step:
|
- step:
|
||||||
image: php:7.0
|
image: php:8.0
|
||||||
name: "PHP 7.0"
|
name: "PHP 8.0"
|
||||||
script:
|
script:
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
- docker-php-ext-install mysqli
|
- apt-get update && apt-get install -y subversion git zip libzip-dev --no-install-recommends
|
||||||
- apt-get update && apt-get install -y subversion --no-install-recommends
|
|
||||||
"""
|
"""
|
||||||
And the {PLUGIN_DIR}/bitbucket-pipelines.yml file should contain:
|
And the {PLUGIN_DIR}/bitbucket-pipelines.yml file should contain:
|
||||||
"""
|
"""
|
||||||
- step:
|
- step:
|
||||||
image: php:7.1
|
image: php:8.2
|
||||||
name: "PHP 7.1"
|
name: "PHP 8.2"
|
||||||
script:
|
script:
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
- docker-php-ext-install mysqli
|
- apt-get update && apt-get install -y subversion git zip libzip-dev --no-install-recommends
|
||||||
- apt-get update && apt-get install -y subversion --no-install-recommends
|
|
||||||
"""
|
|
||||||
And the {PLUGIN_DIR}/bitbucket-pipelines.yml file should contain:
|
|
||||||
"""
|
|
||||||
- step:
|
|
||||||
image: php:7.2
|
|
||||||
name: "PHP 7.2"
|
|
||||||
script:
|
|
||||||
# Install Dependencies
|
|
||||||
- docker-php-ext-install mysqli
|
|
||||||
- apt-get update && apt-get install -y subversion --no-install-recommends
|
|
||||||
"""
|
"""
|
||||||
And the {PLUGIN_DIR}/bitbucket-pipelines.yml file should contain:
|
And the {PLUGIN_DIR}/bitbucket-pipelines.yml file should contain:
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -168,42 +168,29 @@ Feature: Scaffold theme unit tests
|
||||||
And the {THEME_DIR}/t12child/bitbucket-pipelines.yml file should contain:
|
And the {THEME_DIR}/t12child/bitbucket-pipelines.yml file should contain:
|
||||||
"""
|
"""
|
||||||
- step:
|
- step:
|
||||||
image: php:5.6
|
image: php:7.4
|
||||||
name: "PHP 5.6"
|
name: "PHP 7.4"
|
||||||
script:
|
script:
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
- docker-php-ext-install mysqli
|
- apt-get update && apt-get install -y subversion git zip libzip-dev --no-install-recommends
|
||||||
- apt-get update && apt-get install -y subversion --no-install-recommends
|
|
||||||
"""
|
"""
|
||||||
And the {THEME_DIR}/t12child/bitbucket-pipelines.yml file should contain:
|
And the {THEME_DIR}/t12child/bitbucket-pipelines.yml file should contain:
|
||||||
"""
|
"""
|
||||||
- step:
|
- step:
|
||||||
image: php:7.0
|
image: php:8.0
|
||||||
name: "PHP 7.0"
|
name: "PHP 8.0"
|
||||||
script:
|
script:
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
- docker-php-ext-install mysqli
|
- apt-get update && apt-get install -y subversion git zip libzip-dev --no-install-recommends
|
||||||
- apt-get update && apt-get install -y subversion --no-install-recommends
|
|
||||||
"""
|
"""
|
||||||
And the {THEME_DIR}/t12child/bitbucket-pipelines.yml file should contain:
|
And the {THEME_DIR}/t12child/bitbucket-pipelines.yml file should contain:
|
||||||
"""
|
"""
|
||||||
- step:
|
- step:
|
||||||
image: php:7.1
|
image: php:8.2
|
||||||
name: "PHP 7.1"
|
name: "PHP 8.2"
|
||||||
script:
|
script:
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
- docker-php-ext-install mysqli
|
- apt-get update && apt-get install -y subversion git zip libzip-dev --no-install-recommends
|
||||||
- apt-get update && apt-get install -y subversion --no-install-recommends
|
|
||||||
"""
|
|
||||||
And the {THEME_DIR}/t12child/bitbucket-pipelines.yml file should contain:
|
|
||||||
"""
|
|
||||||
- step:
|
|
||||||
image: php:7.2
|
|
||||||
name: "PHP 7.2"
|
|
||||||
script:
|
|
||||||
# Install Dependencies
|
|
||||||
- docker-php-ext-install mysqli
|
|
||||||
- apt-get update && apt-get install -y subversion --no-install-recommends
|
|
||||||
"""
|
"""
|
||||||
And the {THEME_DIR}/t12child/bitbucket-pipelines.yml file should contain:
|
And the {THEME_DIR}/t12child/bitbucket-pipelines.yml file should contain:
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,129 +1,124 @@
|
||||||
pipelines:
|
pipelines:
|
||||||
default:
|
default:
|
||||||
- step:
|
- step:
|
||||||
image: php:5.6
|
image: php:7.4
|
||||||
name: "PHP 5.6"
|
name: "PHP 7.4"
|
||||||
script:
|
script:
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
- docker-php-ext-install mysqli
|
- apt-get update && apt-get install -y subversion git zip libzip-dev --no-install-recommends
|
||||||
- apt-get update && apt-get install -y subversion --no-install-recommends
|
|
||||||
|
|
||||||
# Install PHPCS
|
# PHP extensions
|
||||||
- curl -o /usr/local/bin/phpcs -fSL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar && chmod +x /usr/local/bin/phpcs
|
- docker-php-ext-install -j$(nproc) mysqli pdo_mysql zip
|
||||||
- phpcs --version
|
|
||||||
|
|
||||||
# Install WordPress Coding Standards
|
# Setup WordPress tests
|
||||||
- WPCS_VERSION=0.14.1
|
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
|
||||||
- curl -o wpcs.tar.gz -fSL "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/${WPCS_VERSION}.tar.gz"
|
|
||||||
- mkdir -p /var/wpcs && tar -xzf wpcs.tar.gz --directory /var/wpcs --strip-components 1 && rm wpcs.tar.gz
|
|
||||||
- phpcs --config-set show_progress 1 && phpcs --config-set colors 1 && phpcs --config-set installed_paths /var/wpcs
|
|
||||||
|
|
||||||
## Run PHPCS
|
# Install Composer
|
||||||
- phpcs
|
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||||
|
- php composer-setup.php --install-dir=/usr/local/bin --filename=composer
|
||||||
|
- php -r "unlink('composer-setup.php');"
|
||||||
|
- export PATH="$PATH:$HOME/.composer/vendor/bin"
|
||||||
|
- export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
|
|
||||||
# Install PHPUnit
|
# Install PHPUnit
|
||||||
- PHPUNIT_VERSION=5.7.27
|
- PHPUNIT_VERSION=9.6.19
|
||||||
- curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" && chmod +x /usr/local/bin/phpunit
|
- curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" && chmod +x /usr/local/bin/phpunit
|
||||||
|
- composer global require yoast/phpunit-polyfills
|
||||||
|
- export WP_TESTS_PHPUNIT_POLYFILLS_PATH="$HOME/.composer/vendor/yoast/phpunit-polyfills"
|
||||||
- phpunit --version
|
- phpunit --version
|
||||||
|
|
||||||
## Run PHPUnit
|
# Install PHPCS and WPCS
|
||||||
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
|
- composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
|
||||||
|
- composer global require "wp-coding-standards/wpcs"
|
||||||
|
- composer global require "phpcompatibility/phpcompatibility-wp"
|
||||||
|
- phpcs --version
|
||||||
|
|
||||||
|
# Run PHPCS
|
||||||
|
- phpcs
|
||||||
|
|
||||||
|
# Run PHPUnit
|
||||||
- phpunit
|
- phpunit
|
||||||
services:
|
services:
|
||||||
- database
|
- database
|
||||||
|
|
||||||
- step:
|
- step:
|
||||||
image: php:7.0
|
image: php:8.0
|
||||||
name: "PHP 7.0"
|
name: "PHP 8.0"
|
||||||
script:
|
script:
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
- docker-php-ext-install mysqli
|
- apt-get update && apt-get install -y subversion git zip libzip-dev --no-install-recommends
|
||||||
- apt-get update && apt-get install -y subversion --no-install-recommends
|
|
||||||
|
|
||||||
# Install PHPCS
|
# PHP extensions
|
||||||
- curl -o /usr/local/bin/phpcs -fSL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar && chmod +x /usr/local/bin/phpcs
|
- docker-php-ext-install -j$(nproc) mysqli pdo_mysql zip
|
||||||
- phpcs --version
|
|
||||||
|
|
||||||
# Install WordPress Coding Standards
|
# Setup WordPress tests
|
||||||
- WPCS_VERSION=0.14.1
|
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
|
||||||
- curl -o wpcs.tar.gz -fSL "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/${WPCS_VERSION}.tar.gz"
|
|
||||||
- mkdir -p /var/wpcs && tar -xzf wpcs.tar.gz --directory /var/wpcs --strip-components 1 && rm wpcs.tar.gz
|
|
||||||
- phpcs --config-set show_progress 1 && phpcs --config-set colors 1 && phpcs --config-set installed_paths /var/wpcs
|
|
||||||
|
|
||||||
## Run PHPCS
|
# Install Composer
|
||||||
- phpcs
|
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||||
|
- php composer-setup.php --install-dir=/usr/local/bin --filename=composer
|
||||||
|
- php -r "unlink('composer-setup.php');"
|
||||||
|
- export PATH="$PATH:$HOME/.composer/vendor/bin"
|
||||||
|
- export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
|
|
||||||
# Install PHPUnit
|
# Install PHPUnit
|
||||||
- PHPUNIT_VERSION=6.5.6
|
- PHPUNIT_VERSION=9.6.19
|
||||||
- curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" && chmod +x /usr/local/bin/phpunit
|
- curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" && chmod +x /usr/local/bin/phpunit
|
||||||
|
- composer global require yoast/phpunit-polyfills
|
||||||
|
- export WP_TESTS_PHPUNIT_POLYFILLS_PATH="$HOME/.composer/vendor/yoast/phpunit-polyfills"
|
||||||
- phpunit --version
|
- phpunit --version
|
||||||
|
|
||||||
## Run PHPUnit
|
# Install PHPCS and WPCS
|
||||||
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
|
- composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
|
||||||
|
- composer global require "wp-coding-standards/wpcs"
|
||||||
|
- composer global require "phpcompatibility/phpcompatibility-wp"
|
||||||
|
- phpcs --version
|
||||||
|
|
||||||
|
# Run PHPCS
|
||||||
|
- phpcs
|
||||||
|
|
||||||
|
# Run PHPUnit
|
||||||
- phpunit
|
- phpunit
|
||||||
services:
|
services:
|
||||||
- database
|
- database
|
||||||
|
|
||||||
- step:
|
- step:
|
||||||
image: php:7.1
|
image: php:8.2
|
||||||
name: "PHP 7.1"
|
name: "PHP 8.2"
|
||||||
script:
|
script:
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
- docker-php-ext-install mysqli
|
- apt-get update && apt-get install -y subversion git zip libzip-dev --no-install-recommends
|
||||||
- apt-get update && apt-get install -y subversion --no-install-recommends
|
|
||||||
|
|
||||||
# Install PHPCS
|
# PHP extensions
|
||||||
- curl -o /usr/local/bin/phpcs -fSL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar && chmod +x /usr/local/bin/phpcs
|
- docker-php-ext-install -j$(nproc) mysqli pdo_mysql zip
|
||||||
- phpcs --version
|
|
||||||
|
|
||||||
# Install WordPress Coding Standards
|
# Setup WordPress tests
|
||||||
- WPCS_VERSION=0.14.1
|
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
|
||||||
- curl -o wpcs.tar.gz -fSL "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/${WPCS_VERSION}.tar.gz"
|
|
||||||
- mkdir -p /var/wpcs && tar -xzf wpcs.tar.gz --directory /var/wpcs --strip-components 1 && rm wpcs.tar.gz
|
|
||||||
- phpcs --config-set show_progress 1 && phpcs --config-set colors 1 && phpcs --config-set installed_paths /var/wpcs
|
|
||||||
|
|
||||||
## Run PHPCS
|
# Install Composer
|
||||||
- phpcs
|
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||||
|
- php composer-setup.php --install-dir=/usr/local/bin --filename=composer
|
||||||
|
- php -r "unlink('composer-setup.php');"
|
||||||
|
- export PATH="$PATH:$HOME/.composer/vendor/bin"
|
||||||
|
- export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
|
|
||||||
# Install PHPUnit
|
# Install PHPUnit
|
||||||
- PHPUNIT_VERSION=6.5.6
|
- PHPUNIT_VERSION=9.6.19
|
||||||
- curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" && chmod +x /usr/local/bin/phpunit
|
- curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" && chmod +x /usr/local/bin/phpunit
|
||||||
|
- composer global require yoast/phpunit-polyfills
|
||||||
|
- export WP_TESTS_PHPUNIT_POLYFILLS_PATH="$HOME/.composer/vendor/yoast/phpunit-polyfills"
|
||||||
- phpunit --version
|
- phpunit --version
|
||||||
|
|
||||||
## Run PHPUnit
|
# Install PHPCS and WPCS
|
||||||
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
|
- composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
|
||||||
- phpunit
|
- composer global require "wp-coding-standards/wpcs"
|
||||||
services:
|
- composer global require "phpcompatibility/phpcompatibility-wp"
|
||||||
- database
|
|
||||||
|
|
||||||
- step:
|
|
||||||
image: php:7.2
|
|
||||||
name: "PHP 7.2"
|
|
||||||
script:
|
|
||||||
# Install Dependencies
|
|
||||||
- docker-php-ext-install mysqli
|
|
||||||
- apt-get update && apt-get install -y subversion --no-install-recommends
|
|
||||||
|
|
||||||
# Install PHPCS
|
|
||||||
- curl -o /usr/local/bin/phpcs -fSL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar && chmod +x /usr/local/bin/phpcs
|
|
||||||
- phpcs --version
|
- phpcs --version
|
||||||
|
|
||||||
# Install WordPress Coding Standards
|
# Run PHPCS
|
||||||
- WPCS_VERSION=0.14.1
|
|
||||||
- curl -o wpcs.tar.gz -fSL "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/${WPCS_VERSION}.tar.gz"
|
|
||||||
- mkdir -p /var/wpcs && tar -xzf wpcs.tar.gz --directory /var/wpcs --strip-components 1 && rm wpcs.tar.gz
|
|
||||||
- phpcs --config-set show_progress 1 && phpcs --config-set colors 1 && phpcs --config-set installed_paths /var/wpcs
|
|
||||||
|
|
||||||
## Run PHPCS
|
|
||||||
- phpcs
|
- phpcs
|
||||||
|
|
||||||
# Install PHPUnit
|
# Run PHPUnit
|
||||||
- PHPUNIT_VERSION=6.5.6
|
|
||||||
- curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" && chmod +x /usr/local/bin/phpunit
|
|
||||||
- phpunit --version
|
|
||||||
|
|
||||||
## Run PHPUnit
|
|
||||||
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
|
|
||||||
- phpunit
|
- phpunit
|
||||||
services:
|
services:
|
||||||
- database
|
- database
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue