Skip to content

Commit 8a4ef27

Browse files
committed
Update bitbucket CI
1 parent 7a7d145 commit 8a4ef27

File tree

1 file changed

+74
-79
lines changed

1 file changed

+74
-79
lines changed

templates/plugin-bitbucket.mustache

Lines changed: 74 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,124 @@
11
pipelines:
22
default:
33
- step:
4-
image: php:5.6
5-
name: "PHP 5.6"
4+
image: php:7.4
5+
name: "PHP 7.4"
66
script:
77
# Install Dependencies
8-
- docker-php-ext-install mysqli
9-
- apt-get update && apt-get install -y subversion --no-install-recommends
8+
- apt-get update && apt-get install -y subversion git zip libzip-dev --no-install-recommends
109

11-
# Install PHPCS
12-
- curl -o /usr/local/bin/phpcs -fSL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar && chmod +x /usr/local/bin/phpcs
13-
- phpcs --version
10+
# PHP extensions
11+
- docker-php-ext-install -j$(nproc) mysqli pdo_mysql zip
1412

15-
# Install WordPress Coding Standards
16-
- WPCS_VERSION=0.14.1
17-
- curl -o wpcs.tar.gz -fSL "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/${WPCS_VERSION}.tar.gz"
18-
- mkdir -p /var/wpcs && tar -xzf wpcs.tar.gz --directory /var/wpcs --strip-components 1 && rm wpcs.tar.gz
19-
- phpcs --config-set show_progress 1 && phpcs --config-set colors 1 && phpcs --config-set installed_paths /var/wpcs
13+
# Setup WordPress tests
14+
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
2015

21-
## Run PHPCS
22-
- phpcs
16+
# Install Composer
17+
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
18+
- php composer-setup.php --install-dir=/usr/local/bin --filename=composer
19+
- php -r "unlink('composer-setup.php');"
20+
- export PATH="$PATH:$HOME/.composer/vendor/bin"
21+
- export COMPOSER_ALLOW_SUPERUSER=1
2322

2423
# Install PHPUnit
25-
- PHPUNIT_VERSION=5.7.27
24+
- PHPUNIT_VERSION=9.6.19
2625
- curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" && chmod +x /usr/local/bin/phpunit
26+
- composer global require yoast/phpunit-polyfills
27+
- export WP_TESTS_PHPUNIT_POLYFILLS_PATH="$HOME/.composer/vendor/yoast/phpunit-polyfills"
2728
- phpunit --version
2829

29-
## Run PHPUnit
30-
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
31-
- phpunit
32-
services:
33-
- database
34-
35-
- step:
36-
image: php:7.0
37-
name: "PHP 7.0"
38-
script:
39-
# Install Dependencies
40-
- docker-php-ext-install mysqli
41-
- apt-get update && apt-get install -y subversion --no-install-recommends
42-
43-
# Install PHPCS
44-
- curl -o /usr/local/bin/phpcs -fSL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar && chmod +x /usr/local/bin/phpcs
30+
# Install PHPCS and WPCS
31+
- composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
32+
- composer global require "wp-coding-standards/wpcs"
33+
- composer global require "phpcompatibility/phpcompatibility-wp"
4534
- phpcs --version
4635

47-
# Install WordPress Coding Standards
48-
- WPCS_VERSION=0.14.1
49-
- curl -o wpcs.tar.gz -fSL "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/${WPCS_VERSION}.tar.gz"
50-
- mkdir -p /var/wpcs && tar -xzf wpcs.tar.gz --directory /var/wpcs --strip-components 1 && rm wpcs.tar.gz
51-
- phpcs --config-set show_progress 1 && phpcs --config-set colors 1 && phpcs --config-set installed_paths /var/wpcs
52-
53-
## Run PHPCS
36+
# Run PHPCS
5437
- phpcs
5538

56-
# Install PHPUnit
57-
- PHPUNIT_VERSION=6.5.6
58-
- curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" && chmod +x /usr/local/bin/phpunit
59-
- phpunit --version
60-
61-
## Run PHPUnit
62-
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
39+
# Run PHPUnit
6340
- phpunit
6441
services:
6542
- database
6643

6744
- step:
68-
image: php:7.1
69-
name: "PHP 7.1"
45+
image: php:8.0
46+
name: "PHP 8.0"
7047
script:
7148
# Install Dependencies
72-
- docker-php-ext-install mysqli
73-
- apt-get update && apt-get install -y subversion --no-install-recommends
49+
- apt-get update && apt-get install -y subversion git zip libzip-dev --no-install-recommends
7450

75-
# Install PHPCS
76-
- curl -o /usr/local/bin/phpcs -fSL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar && chmod +x /usr/local/bin/phpcs
77-
- phpcs --version
51+
# PHP extensions
52+
- docker-php-ext-install -j$(nproc) mysqli pdo_mysql zip
7853

79-
# Install WordPress Coding Standards
80-
- WPCS_VERSION=0.14.1
81-
- curl -o wpcs.tar.gz -fSL "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/${WPCS_VERSION}.tar.gz"
82-
- mkdir -p /var/wpcs && tar -xzf wpcs.tar.gz --directory /var/wpcs --strip-components 1 && rm wpcs.tar.gz
83-
- phpcs --config-set show_progress 1 && phpcs --config-set colors 1 && phpcs --config-set installed_paths /var/wpcs
54+
# Setup WordPress tests
55+
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
8456

85-
## Run PHPCS
86-
- phpcs
57+
# Install Composer
58+
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
59+
- php composer-setup.php --install-dir=/usr/local/bin --filename=composer
60+
- php -r "unlink('composer-setup.php');"
61+
- export PATH="$PATH:$HOME/.composer/vendor/bin"
62+
- export COMPOSER_ALLOW_SUPERUSER=1
8763

8864
# Install PHPUnit
89-
- PHPUNIT_VERSION=6.5.6
65+
- PHPUNIT_VERSION=9.6.19
9066
- curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" && chmod +x /usr/local/bin/phpunit
67+
- composer global require yoast/phpunit-polyfills
68+
- export WP_TESTS_PHPUNIT_POLYFILLS_PATH="$HOME/.composer/vendor/yoast/phpunit-polyfills"
9169
- phpunit --version
9270

93-
## Run PHPUnit
94-
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
71+
# Install PHPCS and WPCS
72+
- composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
73+
- composer global require "wp-coding-standards/wpcs"
74+
- composer global require "phpcompatibility/phpcompatibility-wp"
75+
- phpcs --version
76+
77+
# Run PHPCS
78+
- phpcs
79+
80+
# Run PHPUnit
9581
- phpunit
9682
services:
9783
- database
9884

9985
- step:
100-
image: php:7.2
101-
name: "PHP 7.2"
86+
image: php:8.2
87+
name: "PHP 8.2"
10288
script:
10389
# Install Dependencies
104-
- docker-php-ext-install mysqli
105-
- apt-get update && apt-get install -y subversion --no-install-recommends
90+
- apt-get update && apt-get install -y subversion git zip libzip-dev --no-install-recommends
10691

107-
# Install PHPCS
108-
- curl -o /usr/local/bin/phpcs -fSL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar && chmod +x /usr/local/bin/phpcs
109-
- phpcs --version
92+
# PHP extensions
93+
- docker-php-ext-install -j$(nproc) mysqli pdo_mysql zip
11094

111-
# Install WordPress Coding Standards
112-
- WPCS_VERSION=0.14.1
113-
- curl -o wpcs.tar.gz -fSL "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/${WPCS_VERSION}.tar.gz"
114-
- mkdir -p /var/wpcs && tar -xzf wpcs.tar.gz --directory /var/wpcs --strip-components 1 && rm wpcs.tar.gz
115-
- phpcs --config-set show_progress 1 && phpcs --config-set colors 1 && phpcs --config-set installed_paths /var/wpcs
95+
# Setup WordPress tests
96+
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
11697

117-
## Run PHPCS
118-
- phpcs
98+
# Install Composer
99+
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
100+
- php composer-setup.php --install-dir=/usr/local/bin --filename=composer
101+
- php -r "unlink('composer-setup.php');"
102+
- export PATH="$PATH:$HOME/.composer/vendor/bin"
103+
- export COMPOSER_ALLOW_SUPERUSER=1
119104

120105
# Install PHPUnit
121-
- PHPUNIT_VERSION=6.5.6
106+
- PHPUNIT_VERSION=9.6.19
122107
- curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" && chmod +x /usr/local/bin/phpunit
108+
- composer global require yoast/phpunit-polyfills
109+
- export WP_TESTS_PHPUNIT_POLYFILLS_PATH="$HOME/.composer/vendor/yoast/phpunit-polyfills"
123110
- phpunit --version
124111

125-
## Run PHPUnit
126-
- bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true
112+
# Install PHPCS and WPCS
113+
- composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
114+
- composer global require "wp-coding-standards/wpcs"
115+
- composer global require "phpcompatibility/phpcompatibility-wp"
116+
- phpcs --version
117+
118+
# Run PHPCS
119+
- phpcs
120+
121+
# Run PHPUnit
127122
- phpunit
128123
services:
129124
- database

0 commit comments

Comments
 (0)