@@ -6,62 +6,55 @@ variables:
6
6
before_script:
7
7
# Install dependencies
8
8
9
- # update the docker
10
- - apt-get clean
9
+ # Update the docker
11
10
- apt-get -yqq update
12
-
13
- # instll the required packages for the running CI tests
14
11
- apt-get -yqqf install zip unzip subversion default-mysql-client default-libmysqlclient-dev --fix-missing
15
12
16
13
# PHP extensions
17
- - docker-php-ext-enable mbstring mcrypt mysqli pdo_mysql intl gd zip bz2
14
+ - docker-php-ext-install -j$(nproc) mysqli pdo_mysql
18
15
19
- # Set up WordPress tests
16
+ # Setup WordPress tests
20
17
- bash bin/install-wp-tests.sh wordpress_tests root mysql mysql latest true
21
18
19
+ # Install Composer
20
+ - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
21
+ - php composer-setup.php --install-dir=/usr/local/bin --filename=composer
22
+ - php -r "unlink('composer-setup.php');"
23
+ - export PATH="$PATH:$HOME/.composer/vendor/bin"
24
+
25
+ # Install PHPUnit
26
+ - PHPUNIT_VERSION=9.6.19
27
+ - curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${ PHPUNIT_VERSION} .phar" && chmod +x /usr/local/bin/phpunit
28
+ - composer global require yoast/phpunit-polyfills
29
+ - export WP_TESTS_PHPUNIT_POLYFILLS_PATH="$HOME/.composer/vendor/yoast/phpunit-polyfills"
30
+ - phpunit --version
31
+
22
32
# Install PHPCS and WPCS
23
- - composer global require "squizlabs/php_codesniffer=*"
33
+ - composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
24
34
- composer global require "wp-coding-standards/wpcs"
25
35
- composer global require "phpcompatibility/phpcompatibility-wp"
26
- - vendor="$HOME/.composer/vendor"
27
- - phpcs --config-set installed_paths "$vendor/wp-coding-standards/wpcs,$vendor/phpcompatibility/php-compatibility,$vendor/phpcompatibility/phpcompatibility-paragonie,$vendor/phpcompatibility/phpcompatibility-wp"
28
-
29
- PHPunit:PHP5.3:MySQL:
30
- image: tetraweb/php:5.3
31
- services:
32
- - mysql:5.6
33
- script:
34
- - phpcs
35
- - phpunit
36
-
37
- PHPunit:PHP5.6:MySQL:
38
- image: tetraweb/php:5.6
39
- services:
40
- - mysql:5.6
41
- script:
42
- - phpcs
43
- - phpunit
36
+ - phpcs --version
44
37
45
- PHPunit:PHP7.0 :MySQL:
46
- image: tetraweb/ php:7.0
38
+ PHPunit:PHP7.4 :MySQL:
39
+ image: php:7.4-bullseye
47
40
services:
48
- - mysql:5.6
41
+ - mysql:5.7
49
42
script:
50
43
- phpcs
51
44
- phpunit
52
45
53
- PHPunit:PHP7.1 :MySQL:
54
- image: tetraweb/ php:7.1
46
+ PHPunit:PHP8.0 :MySQL:
47
+ image: php:8.0-bullseye
55
48
services:
56
- - mysql:5.6
49
+ - mysql:5.7
57
50
script:
58
51
- phpcs
59
52
- phpunit
60
53
61
- PHPunit:PHP7 .2:MySQL:
62
- image: tetraweb/ php:7.2
54
+ PHPunit:PHP8 .2:MySQL:
55
+ image: php:8.2-bullseye
63
56
services:
64
- - mysql:5.6
57
+ - mysql:5.7
65
58
script:
66
59
- phpcs
67
60
- phpunit
0 commit comments